由网友(哑笑)分享简介:If I have a serialized array... how can I append more values to it? Should I unserialize it first -> add data and then serialize it again? 解决方案 Yes.function add...
If I have a serialized array... how can I append more values to it? Should I unserialize it first -> add data and then serialize it again?
解决方案Yes.
function addItem($serializedArray, $item)
{
$a = unserialize($serializedArray);
$a[] = $item;
return serialize($a);
}
相关推荐
最新文章