php for each loop with key code example
Example 1: php foreach echo key value
foreach($page as $key => $value) {
echo "$key is at $value";
}
Example 2: loop over keys and values php
foreach ($arr as $key => $value) {
echo $key;
}
foreach($page as $key => $value) {
echo "$key is at $value";
}
foreach ($arr as $key => $value) {
echo $key;
}