Re: serialize/deserialize data

From: Date: Tue, 13 Feb 2001 06:55:04 +0000
Subject: Re: serialize/deserialize data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39372@lists.php.net to get a copy of this message
what serialize does is that it allows you to store or pass data types such as arrays, objects etc without losing their structure. for ex, let's say you have an array $foo=array("abc","def") now you need to pass this array to the next page without losing the structure. that is on the next page, you shoudl be able to do $foo[0] and till be able to get $foo[0] as "abc" just do the folloowing $passFoo=serialzie($foo); and pass the value in $passFoo to the next page on the next page, you should do $foo=unserialzie($passFoo) and doing $foo[0] should give you "abc" try it out yourself writing some dummy code and you will understand it better. serialize is extremely helpful in case of storing session variables, arrrays etc. hope that helps Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India ----- Original Message ----- From: "Brian V Bonini" <brian@gfx.cncdsl.com> To: "PHP Lists" <php-general@lists.php.net> Sent: Tuesday, February 13, 2001 5:36 AM Subject: [PHP] serialize/deserialize data > What exactly does > serialize/deserialize data > mean? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#39372) next »