getPagesItems(); if (empty($pagesItems)) { $pagesItems = array(); } else { ksort($pagesItems); } $pages = array(); foreach ($pagesItems as $page => $data) { $pages[$page] = $data['name']; } } else { $pages = menu_get_sec_pages($sec,$menu_hash); } echo json_encode($pages); return; } ?>