Re: more proplems with passing arrays
| From: | Lowell Allen | Date: | Sun, 02 Nov 2003 21:33:03 +0000 |
| Subject: | Re: more proplems with passing arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-168352@lists.php.net to get a copy of this message | ||
> I'm trying to pass an array variable from a search page to the results page
> via GET. The $NAMES variable contains an array which is obtained from the
> URL. Per a previous suggestion I've been trying SERIALIZE/UNSERIALIZE but
> can't get the variable to pass correctly. To take a look at my test files
> follow this URL...
I have success using base64_encode before serializing an array to be passed.
Like so:
$serial_array = base64_encode(serialize($original_array));
Then in the code that gets the serialized array:
$original_array = unserialize(base64_decode($_GET["whatever"]));
HTH
--
Lowell Allen