Cookies do not inherently support arrays.
You'll have to serialize/unserialize your arrays to store them in cookies.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Jack Sasportas <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Wednesday, March 14, 2001 5:57 PM
Subject: [PHP] Help! Cookies...
> I am frustrated with cookies, and the whole array aspect of them.
> I have looked at sample code on php.net, but it keeps bombing.
>
> Here are my questions:
>
> #1 When passing an array to the cookie, is the array one dimensional
> or 2 ?
> In other words when the value is stored in the cookie does it look like
> this:
>
> cookie_name, value1_of_array, value2_of_array, rest of cookie info
> or
> cookie_name,name_of_val1= value1_of_array, name_of_val1=
> value2_of_array, rest of cookie info
>
> if the first, then do I basically have to query the cookie name for
> array position in order to check the value stored there, like
>
> echo $cookie_name[1]
>
> of could I just
> echo $name resulting in value1_of_array ?
>
> Finally if I didn't confuse you...does anyone have a GOOD example of the
> proper way to put & get the cookies in an array format ?
>
> THANKS!
>
>
> ___________________________________________________________
> Jack Sasportas
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]