Id()] = $Group; } # This array is indexed by parent_id $children = array(); foreach ( $Groups as $id=>$Group ) { if ( ! isset( $children[$Group->ParentId()] ) ) $children[$Group->ParentId()] = array(); $children[$Group->ParentId()][] = $Group; if ( $max_depth < $Group->depth() ) $max_depth = $Group->depth(); } xhtmlHeaders(__FILE__, translate('Groups') ); ?>