How to show drupal menu in drop down?
It looks like you're building a so-called "jump menu", is that correct?

It's not considered good practice to code a menu into a template like you're doing in your example. Try to build the functionality of your site with modules (existing ones, or custom) and use the theme (template.php, CSS files, template files) for appearance only.

If you need a jump menu, have a look at the Jump module. It provides a block for every top-level menu and every vocabulary, so it could get you exactly what you need without writing one line of code.