thanks for the replies...
I chose the array structure above so that I could reference elements by their ID number. Maybe this is incorrect. I may try something like
array("hierarchy"=>$hierarchy, "process"=>$process, "metricID"=>$metricID, "is_high_level"=$is_high_level);
essentially, what I need to do is get out of the database results and order them in their hierarchy, eg:
1 1.00 R0000 1
1 1.01 R0001 0 //hidden
1 1.02 R0002 0 //hidden
1 1.03 R0003 0 //hidden
2 2.02 F0002 1
2 2.00 F0000 0 //hidden
2 2.01 F0001 0 //hidden
so I would loop through the array and show all the "is_high_level" elements, then all the ones under it would be hidden (using div style none) then once i get to another is_high_level element, show that etc.
It's ruddy hard to explain really, sorry!!!