hi all,
I've just started dabbling with php and i'm trying to print an associate array using foreach, but if i have a duplicate keys foreach only prints one of the key value pairs. I want to print a list of music artists and the song they perform, so i have say
$songs = array("britney spears"=>"oops", "britney sprears"=>"crazy","jessica simpson"=>"some song");
foreach($songs as $artist=>$song){
echo "$artist sings $song <br />";
}
i want to be able to print even the duplicate keys. is there another way to do this?
thanks for the help.
john