Rumah > Artikel > pembangunan bahagian belakang > php怎么读一个多维数据动态的
php如何读一个多维数据动态的、
Array
(
[3] => Array
(
[0] => Array
(
[seconds] => 16930
[no] => 0
[pt] => 3
[k] => 119981343
[size] => 906330
)
)
[2] => Array
(
[0] => Array
(
[seconds] => 16930
[no] => 0
[pt] => 2
[k] => 119980914
[size] => 472101
)
)
[4] => Array
(
[0] => Array
(
[seconds] => 16930
[no] => 0
[pt] => 4
[k] => 119981696
[size] => 1735787
)
)
[99] => Array
(
[0] => Array
(
[seconds] => 16930
[no] => 0
[pt] => 99
[k] => 119981988
[size] => 679868
)
)
)
我如何读到其内的值,就是no pt k size
这是一个动态数据,就是说3,2,4,99不是固定的,因此不能用此法:[4][0][no]
应该怎么办啊?
------解决方案--------------------
foreach($ar as $r) {<br /> echo $r[0]['k'];<br />}