Source Code:
(back to article)
<?php $myvar = ['hello', 42, [1, 'two'], 'apple']; // Serialize the above data $string = serialize($myvar); // Unserialize the data in $string $newvar = unserialize($string); // Print the unserialized data print_r($newvar); ?>
Result:
Report an issue