How to show drupal menu in drop down? I am trying this code

   echo "&lt;select&gt;" .$main_nav = menu_tree('secondary-links');

            print"&lt;option&gt;"     .    $main_nav   . " &lt;/option&gt;&lt;/select&gt;";&lt;br&gt;


but it display all menu at ones
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.