最简json格式
{ "firstName": "Brett", "lastName":"McLaughlin", "email": "aaaa" }
json_encode()用法: //把对象转成json
<?php
$arr = array (‘a‘=>1,‘b‘=>2,‘c‘=>3,‘d‘=>4,‘e‘=>5);
echo json_encode($arr);
?>
输出结果:{"a":1,"b":2,"c":3,"d":4,"e":5}
原文:http://www.cnblogs.com/gyz418/p/5200123.html