RE: [PHP] multi-dimensional array
| From: | Martin Towell | Date: | Thu, 06 Dec 2001 02:30:05 +0000 |
| Subject: | RE: [PHP] multi-dimensional array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-76816@lists.php.net to get a copy of this message | ||
or you could use the method you wrote - /cart.exe?item[1][1]=3
but if you have lots of items then the url will get pretty large...
-----Original Message-----
From: Michael Sims [mailto:mhsims@midsouth.rr.com]
Sent: Thursday, December 06, 2001 12:34 PM
To: Jordan; php-general@lists.php.net
Subject: Re: [PHP] multi-dimensional array
At 03:41 PM 12/5/2001 -0500, Jordan wrote:
>Is there any way to pass a multi-dimenstional through a url. something
like
>/cart.exe?item[1][1]=3
>
>just curious.
>
>-Jordan
I haven't personally done this myself, but theoretically you could
accomplish this by first using the serialize function:
http://www.php.net/manual/en/function.serialize.php
Then using url_encode on the results and passing that in the URL parameter.
Then on the other page you want to unserialize it:
http://www.php.net/manual/en/function.unserialize.php
I haven't personally used this function for anything yet, but it looks like
it should work fine...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net