怎么将得到的数据存入到数组里

2025-03-25 22:04:25
推荐回答(2个)
回答1:

将数组序列化存储,例如
$stooges = array('Moe','Larry','Curly');
$new = serialize($stooges);
print_r($new);echo "
";
print_r(unserialize($new));
结果:a:3:{i:0;s:3:"Moe";i:1;s:5:"Larry";i:2;s:5:"Curly";}
Array ( [0] => Moe [1] => Larry [2] => Curly )
把$new写进数据库就行啦

回答2:

势如破竹kb静子是贞子陈二