Here's another newbie question which I'm confused about. I've used the foreach function to list the contents of the first array. However, on the second array I can't get the same results. I simply get the last result echoed and the other ones are ignored.
<?php
$array1 = array("Lisa" => 28,"Jack" => 16,"Ryan" => 35,"Rachel" => 46,"Grace" => 34);
foreach($array1 as $names => $numbers)
echo "Name: $names, Age: $numbers <br />"
?>
<br />
<?php
$beatles = array("Singer 1" => "Paul","Singer 2" => "John","Guitarist" => "George","Drummer" => "Ringo");
foreach($beatles as $roles => $names);
echo "$roles: $names <br />"
?>
Can anyone see what I've done wrong here?
Thanks