$arr = Array('one', 'two', 'three');
// $arr = Array('0'=>'one', '2'=>'two', '1'=>'three');
echo json_encode($arr);
PHP索引数组转换成json是数组,php关联数组转换成json是对象。
最新推荐文章于 2021-04-12 16:24:32 发布
$arr = Array('one', 'two', 'three');
// $arr = Array('0'=>'one', '2'=>'two', '1'=>'three');
echo json_encode($arr);