漂亮-用PHP打印JSON
json_encode
$data = array('a' => 'apple', 'b' => 'banana', 'c' => 'catnip');header('Content-type: text/javascript');echo json_encode($data);
{"a":"apple","b":"banana","c":"catnip"}
{ "a": "apple", "b": "banana", "c": "catnip"}
跃然一笑
一只名叫tom的猫