Re: Setting a cookie with an array?
| From: | jeremy brand | Date: | Sat, 18 Nov 2000 09:59:29 +0000 |
| Subject: | Re: Setting a cookie with an array? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26034@lists.php.net to get a copy of this message | ||
Joseph,
> Will I need to write (or borrow :) a routine to change the array into a
> string, and then parse the string back into an array once the page is
> loaded? Or does PHP have some magic formula that does what I am looking for?
Yes it does. Serialize() and unserialize(). :)
> Also, to complicate things, not all pages allow multiple items to be
> checked, in which case I would want to use the first item (in the possible
> array).
You should really learn how to use the DB. This is going to get
overwhelming with cookies -- not to mention having lots of cookies is
not nice.
:)
-jeremy brand
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
- - - - - - - - - - - - - - - - - - - - - - - - -
I am pleased to see that we have differences. May we together become
greater than the sum of both of us.
-- Surak of Vulcan, "The Savage Curtain", stardate 5906.4