Re: Classes and pointers in PHP

From: Date: Mon, 30 Aug 2004 10:46:27 +0000
Subject: Re: Classes and pointers in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-195154@lists.php.net to get a copy of this message
"Arnold" <avanhouten@home.nl> wrote in message news:20040830100027.20602.qmail@pb1.pair.com... > Hi, > > I'm quite new in PHP and i'm struglling with pointers and classes in PHP. > I'd like to create a class with some information and 2 pointers ("next" and > "down") to create a dynamic tree. The "next" pointer points to a new > instance on the same level (level 0) and the down pointer points to an > instance of the lower level (level 1) and so on. The instances should be put > in the tree in the order that it was created. I tried to do it with > recursive calls because every instance can have as many other instances > again. Does anyone know an example of such a tree program or have any > suggestion to do it in another way (for example with arrays)? > > Thanks in advance, > > Arnold Hi Arnold, there's a tree class in PEAR: http://pear.php.net/package/Tree If this is not exactly what you need taking a look at the code might help answering your questions. Best regards, Torsten Roehr

« previous php.general (#195154) next »