<?
$arr=array("images/t9.jpg","images/t2.png","images/t1.png");
echo json_encode($arr);
?>
输出结果:["images\/t9.jpg","images\/t2.png","images\/t1.png"]
还有就是数组不是键值对 怎么样输出 {"src":["images/t9.jpg","images/t2.png","images/t1.png","images/t5.png","images/t3.png","images/t12.jpg"]}
这样的json格式
肥皂起泡泡
相关分类