我是初学者,请帮助我。
$userdata = [
[
['user1', 'job1']
],
[
['user2', 'job2']
],
[
['user3', 'job3']
]
];
答案 0 :(得分:-1)
$firstLevel = count($userdata);
for($a=0; $a<$firstLevel; $a++) {
echo "First Level Key: $a<br>";
$secondLevel = count($userdata[$a]);
for($b=0; $b<$secondLevel; $b++) {
echo "Second Level Key: $b<br>";
$thirdLevel = count($userdata[$a][$b]);
for($c=0; $c<$thirdLevel; $c++) {
echo "Third Level Key: $c => Value: ". $userdata[$a][$b][$c] . '<br>';
}
}
}