I am having issues apparently. I have been reading Foreach Loops Manual and apparently in one loop I need all the songs from an array such as this:
$music = array(
'Creed' => array(
'Human Clay' => array(
array(
'title' => 'Are You Ready'
),
array(
'title' => 'What If'
),
array(
'title' => 'Beautiful'
),
array(
'title' => 'Say I'
),
array(
'title' => 'Wrong Way'
),
array(
'title' => 'Faceless Man'
),
array(
'title' => 'Never Die'
),
array(
'title' => 'With Arms Wide pen'
),
array(
'title' => 'Higher'
),
array(
'title' => 'Was Away Those Years'
),
array(
'title' => 'Inside Us All'
),
array(
'title' => 'Track 12'
),
),
),
)
What I have so far is:
foreach($music['Creed']['Human Clay'] as $song){
var_dump($song);
}
the problem is, $song is an array. I have to do this in one loop. Is this possible?
Yes!
Fiddle: http://phpfiddle.org/main/code/rek-bcn