I have the following function which returns a list of the top level Menu Items:
`
function get_top_level_menu_items()
{
global $menu;
$menu_zero = array_column($menu, 0);
foreach (array_keys($menu_zero, ”, true) as $key) {
unset($menu_zero[$key]);
}
return $menu_zero;
}
`
What I would like to do is create a select box, checkbox (or something similar) that is populated by this list of menu items. I’m not sure, though, how to do that. How can I access the $menu_zero array inside of piklist?