'.$func($branch).'

'; if (isset($tree[$branch['id']])) { echo '
'; tree_branch($tree, $branch['id'], $func); echo '
'; } } } function tree($tree, $func) { echo '
'; tree_branch($tree, 0, $func); echo '
'; }