You are here

function og_subgroups_make_list in Subgroups for Organic groups 5.3

1 call to og_subgroups_make_list()
og_subgroups_tree in ./og_subgroups.module

File

./og_subgroups.module, line 723
Maintains a hierarchy of group/subgroup relationships.

Code

function og_subgroups_make_list($array, $depth = 0) {
  if ($depth == 0) {
    $togo = "<ul>";
  }
  else {
    $togo = "<ul style='display:none'>";
  }
  foreach ($array as $i) {
    $togo .= "<li class=leaf>{$i}</li>";
  }
  $togo .= "</ul>";
  return $togo;
}