Hello,
I have a function which is registering a navigation menu
function register_menu($name, $displayname){
if(!is_menu()){
$menu['name'] = $name;
$menu['displayname'] = $displayname;
$registered = TRUE; //This should be global, so that is_menu() function can use it.
}
}
And another function which checks if the menu is registered
function is_menu(){
return $registered; //I need to get this from register_menu(). How ?
}
How can I use variables from one function in another function ?