loop over keys and values php code example
Example 1: loop over keys and values php
foreach ($arr as $key => $value) {
echo $key;
}
Example 2: php loop object keys
echo $obj->name;
echo $obj->age;
foreach ($arr as $key => $value) {
echo $key;
}
echo $obj->name;
echo $obj->age;