【发布时间】:2010-02-12 05:06:13
【问题描述】:
这是我的问题,我有一个这样的 php 数组:
$output = array(array(1,1,1,1),array(2,2,2,2),array(3,3,3,3));
在数组被编码为 json 之后,我得到了这个:
$output = {"1":[1,1,1,1],"2":[2,2,2,2],"3":[3,3,3,3]}
我想要的只是将 PHP 数组传递给 Javascript,以便 JS 看起来像这样:
var output = [[1,1,1,1],[2,2,2,2],[3,3,3,3,]];
提前谢谢...
【问题讨论】:
标签: php json javascript