a:2:{i:0;s:10:"11月25日";i:1;s:0:"你好";} 怎么能够取到值 &"/>  a:2:{i:0;s:10:"11月25日";i:1;s:0:"你好";} 怎么能够取到值 &">

数组处理 a:二:{i:0;s:10:"11月25日"i:1;s:0:"你好"}

WBOY
Release: 2016-06-13 12:10:01
Original
1122 people have browsed it

数组处理 a:2:{i:0;s:10:"11月25日";i:1;s:0:"你好";}
如题在supesite 遇到 [customfieldtext] => a:2:{i:0;s:10:"11月25日";i:1;s:0:"你好";} 
怎么能够取到值  11月25日   和 你好
------解决思路----------------------
你用PHP的unserialize函数解析这段字符串试试
------解决思路----------------------

$s = 'a:2:{i:0;s:10:"11月25日";i:1;s:6:"你好";}';<br />print_r(unserialize($s));
Copy after login
Array<br />(<br />    [0] => 11月25日<br />    [1] => 你好<br />)<br /><br />
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template