I'm trying to figure out what type of array is that:
I found it on a Wordpress database, how can I tranform into a json string?
a:6{i:0;s:3:\"948\";i:1;s:3:\"949\";i:2;s:3:\"951\";i:3;s:3:\"952\";i:4;s:3:\"953\";i:5;s:4:\"1742\";}
It seems that the data is corrupted:
$content = 'a:6:{i:0;s:3:"948";i:1;s:3:"949";i:2;s:3:"951";i:3;s:3:"952";i:4;s:3:"953";i:5;s:4:"1742";}'
json_encode(unserialize($content));
Note the missing colon after "a:6"
似乎是由serialize()生成的,可以通过调用方法unserialize()对其进行反序列化
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.