title: Issue in menu tree for selection and bootstrap navbar
body: <p>I tried to use the code below for inside downdrop selection, like:</p>
  
  <ol>
  <li>Menu
  
  <ul>
  <li>Submenu</li>
  <li>Submenu
  
  <ul>
  <li>Sub-submenu</li>
  </ul></li>
  </ul></li>
  <li>Menu
  
  <ul>
  <li>Submenu
  
  <ul>
  <li>Sub-submenu</li>
  <li>Sub-submenu</li>
  </ul></li>
  </ul></li>
  </ol>
  
  <p>etc ..</p>
  
  <p>I want to use the same function for dropdown menus and also bootstrap navbar (horizon menu).</p>
  
  <pre><code>function PagesList($parent_id) 
  {
      global $conn;
  
      $menu = "";
      $sqlquery = " SELECT * FROM pages where p_top='" .$parent_id . "' ORDER BY BINARY p_name ASC";
      $res=mysqli_query($conn,$sqlquery);
  
      while($row=mysqli_fetch_array($res,MYSQLI_ASSOC)) 
      {   
          $menu .="&lt;option value = \"".$row['p_id']."\" $sel&gt;";
          $menu .=$row['p_name']."&lt;/option&gt;";
          $menu .=PagesList($row['p_id']).""; 
      }
  
      return $menu;
  }
  </code></pre>