note 18363 deleted from function.serialize by sniper
| From: | sniper@php.net | Date: | Tue, 23 Sep 2003 22:38:29 +0000 |
| Subject: | note 18363 deleted from function.serialize by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57004@lists.php.net to get a copy of this message | ||
Note Submitter: jonathan@schottweb.de
----
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!