标签:
$arr=array(‘1‘,‘2‘,‘3‘);
echo serialize($arr); //序列化
a:3:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"3";}
$a=unserialize(a:3:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"3";}); //反序列化
dump($a);
array(3) { [0] => string(1) "1" [1] => string(1) "2" [2] => string(1) "3" }
标签:
原文地址:http://www.cnblogs.com/xiamibk/p/4179717.html