> Food:Fruit:Red > Food:Fruit:Green > Food:Fruit:Yellow > Food:Vegetables:Long > Food:Vegetables:Round > Food:Vegetables:Round:Spikey > Food:Vegetables:Round:Smooth How is your structure being built? Is it hard-coded or dynamic (e.g. pulled from a DB)? We employ a similar "tree" structure for manging items in our store front. Believe me when I say, its a hell of a lot easier to only be concerned about the current item rathen then every item in the sturcture. Consider that a 1-to-many relationship is much easier to deal with than a many-to-many relationship. What I mean is, if you are looking at the element "Round", don't concern yourself with "Fruit" or "Long". Figure out your "upstream" path for the current element, e.g. "Food:Vegetables" (which should be easy if you assume that each element only has 1 parent). Then figure out the children for the current element, e.g. "Spikey" and "Round". KISS. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php