我怎么能访问这种类型的php数组?例如,我想从数据数组中的每个数组中获取时间值?
(每个数组都以不同的名称开头,并且总是更改它可以是' AK7FJAIEVBCA6'或者#PNAYN6JEB9VSJ2'等等。)
Array (
[test] => 1
[data] => Array (
[Changing_value1] => Array (
[now] => 1
[time] => 10000
)
[Changing_value2] => Array (
[now] => 1
[time] => 10000
)
[Changing_value3] => Array (
[now] => 1
[time] => 10000
)
)
)
答案 0 :(得分:1)
$array['data'][0]['time']
或迭代它
foreach($array['data'] as $data) {
$time = $data['time'];
}