我有一个像下面给出的数组。我想一一呼应这些元素。帖子中还添加了预期输出
$myArray => Array
(
[0] => Array
(
['id'] => 1
['name'] => "Amla"
['age'] => 25
)
[1] => Array
(
['id'] => 2
['name'] => "Kallis"
['age'] => 35
)
)
// 预期输出
1 Amla 25
2 Kallis 35
我的代码:
foreach ($myArray as $key => $value){
echo "$myArray[$key]=>$value"."</br>";
}