loops object in php code example
Example 1: php loop through object
foreach ($obj as $key => $value) {
echo "$key => $value\n";
}
Example 2: php loopthrough object
foreach ($objects as $obj) {
echo $obj->property;
}
Example 3: php loop through objects
foreach ($obj as $key => $value) {
echo "$key => $value\n";
}