Zareef Ahmed wrote:
But you need to do serialize and unserialize in case of array or object.
Do ::
$val_ar=array("one","two","three");
$_SESSION['val_ar_store']=serialize($val_ar);

Serialization is done automatically. You don't need to do it yourself. You can even store simple value-objects in the session witout manual serialization.


So you can do:

$val_ar = array("one", "two", "three");
$_SESSION['val_ar_store'] = $val_ar;


serialize/unserialize are useful if you want to store complex data in a file or in a database.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to