This is an array i have
<?php $page['Home']='index.html'; $page['Service']='services.html'; ?>
How do i get to echo something like this for individual one like
Home is at index.html
and again how can i do this through a loop and echo all?
Advertisement
Answer
foreach($page as $key => $value) { echo "$key is at $value"; }
For ‘without loop’ version I’ll just ask “why?”