PHP foreach loop key value
foreach($data as $key => $value):
echo $key; echo $value;
endforeach;
Example:
<?php
foreach($this->universities as $key => $value):
if($key == $group->group_id):
echo $value;
endif;
endforeach;
?>
foreach($data as $key => $value):
echo $key; echo $value;
endforeach;
Example:
<?php
foreach($this->universities as $key => $value):
if($key == $group->group_id):
echo $value;
endif;
endforeach;
?>
Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by whitelisting our website.