Wednesday, December 2, 2009

serialize and unserialize

serialize

serialize — Generates a storable representation of a value

string serialize ( mixed $value )

Generates a storable representation of a value

This is useful for storing or passing PHP values around without losing their type and structure.

To make the serialized string into a PHP value again, use unserialize().


unserialize

unserialize — Creates a PHP value from a stored representation

mixed unserialize ( string $str )

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

No comments:

Post a Comment