php 输出JSON格式,使用json_encode函数即可例如:得到结果:{"fruits":{"a":"orange","b":"banana","c":"apple"},"numbers":[1,2,3,4,5,6],"holes":{"0":"first","5":"second","6":"third"}}