Document Tree'; $nested_docs = array(); $idExposeTreeIndex = 0; $idhtml = 0; if ($d_arr != NULL ) { if (!$d_arr || count($d_arr) > 0) { // Get the document groups info //put the doc objects into an array keyed off the docgroup foreach ($d_arr as $doc) { $nested_docs[$doc->getDocGroupID()][] = $doc; } } } echo '