I am litle confused about this, so I hope someone could give reply on this
message an give me the right answer.

I am comfortable with the use of session, but lately when I have surf
around, I have found some documents/tutorials about saving Objects/classes
in session. It's here I am beginning to be confused. Is this for earlier
version of Php (Version 3) or what does this mean.

Is it like this:
When a user comes to my site, I intializes all the classes the site needs to
run properly, and then I serialize() the class and put them in a session
Then when the user goes to other places on my site, I only have to
unserialize() the class sessionvariable name and use the object.
First page:
$a = new A;
$b = new B;

$s[a] = serialize($a);
$s[b] = serialize($b);



Second Page:

$a = unserialize($s[a]);
$b = unserialize($s[b]);


I hope someone could give a hint on how this work.

David Tandberg-Johansen

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to