(Supports PHP 4 and above)

unserialize — converts a serialized data to actual data.

unserialize() takes a single serialized variable and converts it back into a PHP value.

Return value

The converted  value can be an array, a boolean, float, integer or string.

Value Type : Mixed*.

*Mixed : Mixed indicates that the return value may multiple (but not necessarily all) types.


$data = array();
$data[] = "The";
$data[] = "Quick";
$data[] = "Brown fox";

$serialized_data = serialize($data);
print $serialized_data . "\n";

$unserilalizedData = unserialize($serialized_data);
?>; [/php]

array (size=3)
  0 > string 'The' (length=3)
  1 > string 'Quick' (length=5)
  2 > string 'Brown fox' (length=9)
PHP Unserialize Function

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: