i haven't read most of whats been said up there, but you are having trouble getting multiple hierarchies out of your object or set?
i wouldn't use a "for" loop but a while
Code:
//in java
public static void start()
{
//get the query
//$result=mysql_query("select cat_id,cat_name from heirarchy where cat_id=parent_id");
}
public static void processNewCat(String catID)
{
cat_id = catID;
while(cat_id != null)
{
processNewCat(cat_id);
}
}
erm
anyway, that doesn't mean much up there, i can't really write it in this thing (i need textpad

) but you need a function that calls itself for each node and gets nodes from that node and calls itself based on them each time until the node == null then you've reached the end of a category
e.g
People
- Men
- Boys
- Blonde haired boys
people finds men, which calls the same function again for boys etc etc etc
i hope you understand this, if not im sure sdeming or techno will explain it further

.. i know what im talking about.
