昨天调用同事的一个json接口,发现调用php中的函数json_decode无法转化为数组。 <?php $json = "{'d':[['xxx','中国','广西','xjr7670@sina.com','2010-05-01 13:35:02'],['xxx','中国','广西','xjr7670@sina.com','2010-05-01 13:35:02']],'c':13659,'n':759}"; print_r(json_decode($json, true));//无法显示 //将单引号改为双引号就好了 $json = '{"d":[["xxx","中国","广西","xjr7670@sina.com","2010-05-01 13:35:02"],["xxx","中国","广西","xjr7670@sina.com","2010-05-01 13:35:02"]],"c":13659,"n":759}'; print_r(json_decode($json, true));