function array_print($arr) { echo "<ul>"; foreach ($arr as $k => $v) { if (is_array($v)) { echo "<li>{$k}=>"; array_print($v); echo "</li>"; } else { echo "<li>{$k}=>{$v}</li>"; } } echo "</ul>"; }
} } $GLOBALS['template']->fp('doc', 'border_top', True); reset($doc_array); while (list($group_key, $group_value) = each($doc_array)) { $GLOBALS['template']->set_var('group_name', $group_key); /* This is where most of the work in creating the output gets done */ while (list($object_key, $object_value) = each($group_value)) { if ($object_key == '0') { $GLOBALS['template']->set_var('object_id', ''); $GLOBALS['template']->set_var('object_name', ''); } else { $GLOBALS['template']->set_var('object_id', trim(ereg_replace("function ", "", $object_key))); $GLOBALS['template']->set_var('object_name', $object_key); } if (is_array($object_value)) { parsedetails($object_value); $GLOBALS['template']->set_var('generic_name', $docline_key); $GLOBALS['template']->set_var('generic_value', $docline_value[0]); $GLOBALS['template']->fp('group_contents', 'object', True); $GLOBALS['template']->set_var('object_contents', ''); } } $GLOBALS['template']->fp('doc', 'group', True); $GLOBALS['template']->set_var('group_contents', ''); } $GLOBALS['template']->fp('doc', 'border_bottom', True); $GLOBALS['template']->pfp('out', 'doc'); echo '<a name="array">'; array_print($doc_array);