php iterate through object properties code example Example: php iterate thru object foreach ($obj as $key => $value) { echo "$key => $value\n"; }