note 18363 added to function.serialize

From: Date: Sun, 20 Jan 2002 01:39:12 +0000
Subject: note 18363 added to function.serialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-25547@lists.php.net to get a copy of this message
The easiest and best way of passing data, especially arrays, between pages with serialize() is to use base64_encode() rather than urlencode(). This looks for example like this little piece of code: 1st page: $some_array = array([...]); $var_querystring = base64_code(serialize($some_array)); 2nd page: $some_other_array = unserialize(base64_decode($var_querystring)); The other ways mentioned above didn't work for me! (PHP 4.0.6 on Apache 1.3.12) Good Luck! -- http://www.php.net/manual/en/function.serialize.php http://master.php.net/manage/user-notes.php?action=edit+18363 http://master.php.net/manage/user-notes.php?action=delete+18363 http://master.php.net/manage/user-notes.php?action=reject+18363

« previous php.notes (#25547) next »