note 39710 added to function.serialize

From: Date: Sun, 08 Feb 2004 10:48:13 +0000
Subject: note 39710 added to function.serialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-64819@lists.php.net to get a copy of this message
In order to save serialized values in cookies you have to pay attention to the following: A serialized array looks like this: a:2:{i:0;s:9:"Element 1";i:1;s:9:"Element 2";} Because quotation marks are saved with a backslash in front of it in cookies it is not possible to unserialize a cookie-saved serialized array. You have to do a stripslashes() before unserializing the cookie. ---- Manual Page -- http://www.php.net/manual/en/function.serialize.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39710 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39710&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39710&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64819) next »