当前位置:Gxlcms > PHP教程 > 请教怎样才能方便地读取这种类型数据中的值

请教怎样才能方便地读取这种类型数据中的值

时间:2021-07-01 10:21:17 帮助过:15人阅读

请问怎样才能方便地读取这种类型数据中的值?
在PHP中,请问怎样才能方便地读取下面这种类型数据中的值呢?

[[["123", "abc"],["def","fghasdf"],123,0,1,2],["","asdf"],,,123]

先谢谢了!

分享到:


------解决方案--------------------
js 数组?关键看你要读取什么值。
------解决方案--------------------
$s = '[[["123", "abc"],["def","fghasdf"],123,0,1,2],["","asdf"],123]';
print_r(json_decode($s));

Array
(
[0] => Array
(
[0] => Array
(
[0] => 123
[1] => abc
)

[1] => Array
(
[0] => def
[1] => fghasdf
)

[2] => 123
[3] => 0
[4] => 1
[5] => 2
)

[1] => Array
(
[0] =>

人气教程排行