Unable to return values from function
The foreach surrounding your return line means only the first item will be returned – perhaps that’s what you want? If not, then you should assign $value[2] to a local variable (concatenating if you want a string, or an array perhaps?) and the return the local variable after the loop. function get_admin_menus() { global $submenu, … Read more