You have a typo in the form()
function: $nav_menu1
and $nav_menu
.
Use more meaningful, strict and descriptive names for your variables. For example, $menus1
could be called $get_nav_menus
.
Use a good IDE, like NetBeans or similar, and check the WordPress Coding Standards Handbook.
Oh, yes, your code is dumping PHP Notices, always develop with WP_DEBUG enabled.