json_decode( $json, $assoc = TRUE)
第一个参数是json字符串,第二个参数是否转为数组
遇到的问题:
从前端接收到的数据使用这个语法,转出来的是NULL,
解决:
json_decode(stripcslashes(html_entity_decode($json)),true)
记录。
json_decode( $json, $assoc = TRUE)
第一个参数是json字符串,第二个参数是否转为数组
遇到的问题:
从前端接收到的数据使用这个语法,转出来的是NULL,
解决:
json_decode(stripcslashes(html_entity_decode($json)),true)
记录。