foreach ($movies as $genre => $movielist) { echo "Movies in Genre $genre:<br /><ul>" foreach ($movielist as $movie) { echo "<li>$movie</li>\n"; } echo "</ul><br /><br />"; }