Rumah >pembangunan bahagian belakang >tutorial php >数据库取出来的json问题
我把一段JOSN代码存在数据库存的一个字段里,但存进后双引号都转义了。
像这样
[{"id":"9","model":"A2","quantity":1}]
[{"id":"9","model":"A2","quantity":1},{"id":"8","model":"A1","quantity":1}]
$s = ‘[{"id":"9","model":"A2","quantity":1}]’;echo html_entity_decode(html_entity_decode($s));[{"id":"9","model":"A2","quantity":1}]