对于特定的不能使用json_decode的json的话,建议直接输出
比如:
echo '{'; //假设你的数据是从数据库中读取 $query = mysql_query(查询语句); while($row = mysql_fetch_array($query)){ echo $row['字段']; //在这里构造出json显示的数据 } echo '}';?>
希望可以帮到你
print_r(json_decode($arr,true)); $arr = 你的字符串