PHP serialize() function
Description
We can use serialize() to save objects into a string, then use urlencode() to get a format suitable for the web.
Syntax
PHP serialize() has the following syntax.
serialize($aVariable);
Example
Serialize a class
<?PHP//ww w . ja v a 2 s . c o m
class ComputerBook{ }
$aBook = new ComputerBook;
$safepoppy = urlencode(serialize($aBook));
?>