ksorts sorts an array by its keys, so sorting $iforumcache[$parentid] sorts that array by displayorder.
I'm not certain what childlist is for. Maybe in building search indexes or something.
vBs way is fine, and probably easier to manipulate in PHP quickly. Less implementation would be using the way I explained in my previous post, since you don't have to rebuild a parentlist whenever a forum is relocated.
|