Re: [PHP] serialize() function

2006-04-14 Thread tedd
Jochem: $_SESSION has another advantage - everything you stick in it is automagically serialized and unserialized at end/start of the request. I didn't know that. Thanks, now I have to figure out a way to store a $_SESSION in a cookie and read it back without inferring with what the user is

Re: [PHP] serialize() function

2006-04-14 Thread Jochem Maas
tedd wrote: Jochem: $_SESSION has another advantage - everything you stick in it is automagically serialized and unserialized at end/start of the request. I didn't know that. Thanks, now I have to figure out a way to store a $_SESSION in a cookie and read it back without inferring with

Re: [PHP] serialize() function

2006-04-13 Thread Jochem Maas
Nicholas Couloute wrote: Are there any tutorials and uses for serialize() ? I went to php.net and it isn't well documented as I would hope! ?php $o = new StdObject; $a = array(); $i = 1; $b = false; echo serialize($o),\n, serialize($a),\n, serialize($i),\n, serialize($b),\n,

Re: [PHP] serialize() function

2006-04-13 Thread Jochem Maas
Nicholas Couloute wrote: I was thinking of a news system with comments. fine. but what's that got to do with serialize() per se? or put another don't look at a function decide it might be useful and then force yourself to build an application with it cart before the horse and all that.

Re: [PHP] serialize() function

2006-04-13 Thread tedd
At 12:04 AM +0200 4/14/06, Jochem Maas wrote: Nicholas Couloute wrote: Are there any tutorials and uses for serialize() ? I went to php.net and it isn't well documented as I would hope! ?php $o = new StdObject; $a = array(); $i = 1; $b = false; echo serialize($o),\n, serialize($a),\n,

Re: [PHP] serialize() function

2006-04-13 Thread Jochem Maas
tedd wrote: At 12:04 AM +0200 4/14/06, Jochem Maas wrote: Nicholas Couloute wrote: Are there any tutorials and uses for serialize() ? I went to php.net and it isn't well documented as I would hope! ?php $o = new StdObject; $a = array(); $i = 1; $b = false; echo serialize($o),\n,

Re: [PHP] serialize() function

2006-04-13 Thread Robert Cummings
On Thu, 2006-04-13 at 18:58, tedd wrote: Not that you don't know -- because I'm sure you do -- but for the benefit of others. One example, each domain has a limit of cookies (20) and you can use them up pretty quickly. However, if you place your data in an array, you could then serialize

Re: [PHP] serialize() function

2006-04-13 Thread Jochem Maas
Robert Cummings wrote: On Thu, 2006-04-13 at 18:58, tedd wrote: Not that you don't know -- because I'm sure you do -- but for the benefit of others. One example, each domain has a limit of cookies (20) and you can use them up pretty quickly. However, if you place your data in an array, you

Re: [PHP] serialize() function

2006-04-13 Thread Richard Lynch
On Thu, April 13, 2006 7:03 pm, Jochem Maas wrote: One example, each domain has a limit of cookies (20) and you can use I wasn't aware that there was a hard limit on cookies - I always thought this was a browser dependent setting ... not that I ever get above 2 cookies max (and mostly just 1

Re: [PHP] serialize() function

2006-04-13 Thread Richard K Miller
There's nothing special about the data returned by serialize() except that it can be safely written saved, transmitted, etc. To do anything useful with it you have to unserialize() it. The cool part about it is that you can serialize any data structure, like an entire array or object.