PHP序列化函数serialize对数组进行序列化
PHP序列化数组用途:
较为复杂的数组数据变为字符串,方便数组存库操作。需要用的时候取出还原
PHP序列化数组用途:
$test = array("a"=>0,"b"=>0,"c"=>0);
$test2 = '';
$test2=serialize($test);
echo $test2; //类似a:3:{s:1:"a";i:0;s:1:"b";i:0;s:1:"c";i:0;}
print_r(unserialize($test2));