http://qs321.pair.com?node_id=330344


in reply to Re: group based array sort
in thread group based array sort

bageler seems to be looking for something more complicated that that, I'm afraid - that would simply give
foo ->bar ->narf -->trof -->etc.
I don't know if this is possible without recursion...being lazy, I'd personally use a recursive "GetChildren($id)" routine which greps for the parent $id and pushes the returned list onto itself - terribly inefficient (as you'd be grepping the list for every element), but easier to code :)

Cheers,
Ben.