nested objects in sessions?

From: Date: Thu, 06 Jul 2000 09:30:17 +0000
Subject: nested objects in sessions?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-23684@lists.php.net to get a copy of this message
Hi all, I'm using sessions and BTW they work great. I've not had near the problems other people seem to be having...err.. well, hmm... until now... Consider this pseudo code: class rs { var $type; var $item; } class grp { var $id; var $name; var $rs function grp(){ $id = 12; $name = "foo"; $rs = array(); $rs[0] = new rs; $rs[0]->type = 5; $rs[0]->item = "bar"; $rs[1] = new rs; $rs[1]->type = 2; $rs[1]->item = "candy"; } } I can register grp fine, but I seem to be loosing the contents of $rs within an object of class $grp. Should this work? --pk

« previous php.dev (#23684) next »