phpnoob91
04-10-2012, 08:10 PM
1) Create a variable called $artist_songs and give it the value of an associative
array where the keys are the artist names from the first exercise, and the values are
arrays of songs by the artist. Include at least three songs by each artist:
$artist_songs=array(
'Iron Maiden' => array('Invasion', 'Run to the Hills', 'Aces High'),
'Carly Simon' => ....
2) Loop through $artist_songs using foreach and output a div for each artist. Show
the artist name in bold and put the songs in an unordered list:
<div>
<b>Iron Maiden</b>
<ul>
<li>Invasion</li>
<li>Run to the Hills</li>
<li>Aces High</li> </ul>
</div>
<div>
<b>Carly Simon</b>
...etc
array where the keys are the artist names from the first exercise, and the values are
arrays of songs by the artist. Include at least three songs by each artist:
$artist_songs=array(
'Iron Maiden' => array('Invasion', 'Run to the Hills', 'Aces High'),
'Carly Simon' => ....
2) Loop through $artist_songs using foreach and output a div for each artist. Show
the artist name in bold and put the songs in an unordered list:
<div>
<b>Iron Maiden</b>
<ul>
<li>Invasion</li>
<li>Run to the Hills</li>
<li>Aces High</li> </ul>
</div>
<div>
<b>Carly Simon</b>
...etc