RE: [PEAR-DEV] NestedSet

From: Date: Wed, 03 Sep 2003 10:07:07 +0000
Subject: RE: [PEAR-DEV] NestedSet
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-21015@lists.php.net to get a copy of this message
Hello Arnaud, > When fetching all nodes from the database the returned array has > the node id > as a key. SInce it is found in the node_id element would it be possible to > change this behaviour to return an array indexed from 0 ? Well ATM this change would be a BC break. Additionally it mostly makes sense to have the array indexed this way as you are able to access a node by it's id instead of harvesting the array to find a node given by ID. > It would simplify life (i wouldn't have to recreate array indexed > from Zero > to give to smarty ;) I would recommend using smarty's foreach instead of for. I think this should work. hth Daniel Khan

« previous php.pear.dev (#21015) next »