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