menus.php 462 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. $data = elgg_extract("data", $vars);
  3. if (empty($data)) {
  4. return;
  5. }
  6. foreach ($data as $key => $arr) {
  7. $menu = "<table class='elgg-table-alt'>";
  8. foreach ($arr as $subkey => $value) {
  9. $menu .= "<tr>";
  10. $menu .= "<td>{$subkey}</td>";
  11. $menu .= "<td><ul>";
  12. foreach ($value as $item) {
  13. $menu .= "<li>$item</li>";
  14. }
  15. $menu .= "</ul></td>";
  16. $menu .= "</tr>";
  17. }
  18. $menu .= "</table>";
  19. echo elgg_view_module("inline", $key, $menu);
  20. }