$arr) { $menu = ""; foreach ($arr as $subkey => $value) { $menu .= ""; $menu .= ""; $menu .= ""; $menu .= ""; } $menu .= "
{$subkey}
    "; foreach ($value as $item) { $menu .= "
  • $item
  • "; } $menu .= "
"; echo elgg_view_module("inline", $key, $menu); }