Re: Re[2]: [PHP] Tree

From: Date: Fri, 05 Dec 2003 06:38:42 +0000
Subject: Re: Re[2]: [PHP] Tree
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-171950@lists.php.net to get a copy of this message
On Fri, 2003-12-05 at 01:27, Šimon Tóth wrote: > But how do I make an array where each of successor is also an array. > > The structure should be something like this: > $root['ID']=0; > $root['From']=""; > $root['Subj']=""; > $root['Replays'] - ??? > > Each of the succesors must have same structure as $root. $tree = array ( 'ID' => 0, 'From' => 'Wolferine', 'Subj' => 'Trees and shrubbery.', 'Replies' => array ( array ( 'ID' => 1, 'From' => 'Supermon', 'Subj' => 'Re: Trees and shrubbery.', 'Replies' => array ( ), ), array ( 'ID' => 2, 'From' => 'Wonder Womban', 'Subj' => 'Re: Trees and shrubbery.', 'Replies' => array ( ), ), ), ); HTH, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.general (#171950) next »