serialize — generates a storable representation of a value
unserialize — creates a php tutorial value from a stored representation
Want to turn a serialized string back into a php value, You can use unserialize(). serialize() can handle any type except resource. You can even serialize() arrays that contain references to themselves. References in the array/object you are serializing() will also be stored.
*/
serialize
//store data:
$array = explode('rn', $string);
$serialized = serialize($array) ;
//restore data:
$array = unserialize($serialized);
$text = implode('rn', $array);
unserialize
function restorepost() {
if (isset($_post[savepost])) {
$_post = unserialize(strips tutorial lashes(htmlspecialchars_decode($_post[savepost]))));
}
}