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