我显然有问题。我一直在阅读Foreach Loops Manual并且显然在一个循环中我需要来自这样一个数组的所有歌曲:
$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'
),
),
),
)
到目前为止,我所拥有的是:
foreach($music['Creed']['Human Clay'] as $song){
var_dump($song);
}
问题是,$song 是一个数组。我必须在一个循环中执行此操作。这可能吗?