原来的字符串
{"0":{"url":"/uploads/admin/202207/62dfe1e4e8de7.png","title":""},"1":{"url":"/uploads/admin/202207/62dfe1e474684.png","title":""},"2":{"url":"/uploads/admin/202207/62dfe1e3e3f8d.png","title":""},"3":{"url":"/uploads/admin/202207/62dfe1e3b5d3a.png","title":""},"4":{"url":"/uploads/admin/202207/62dfe1e377cfc.png","title":""}}
要求变成数组。
从字符中可以看出是转义过的符号。
所以先转义:
htmlspecialchars_decode
然后变成了JSON。再把JSON转换成数组。
<?php
echo $i["piclist"];
print_r( json_decode(htmlspecialchars_decode($i["piclist"]),true));
exit;
?>