1 2 3 4 5 6
<?php $band = array('Guitar' => 'Johnny', 'Vocals'=> 'Stephen', 'Bass' => 'Andy', 'Drums' => 'Mike'); foreach($band as $key => $myvalues){ echo "On {$key} we have {$myvalues} <br>"; } ?>
1
On Guitar we have Johnny <br>On Vocals we have Stephen <br>On Bass we have Andy <br>On Drums we have Mike <br>