title: Creating a drop-down menu to represent nested categories
body: <p>I have a category and this category is divided into subcategories at the level 5. I want to define a function that how we can access data form all level of category in proper way.</p>
  
  <pre><code> Full Texts     id  cat_id subcat_id    cat_name subcat_name status
  Edit    Delete  1       0       0       food                2
  Edit    Delete  2       1       0       indian              1
  Edit    Delete  3       2       0       japanis             1
  Edit    Delete  4       3       0       chaines             1
  Edit    Delete  5       4       0       american            1
  Edit    Delete  6       5       0       southex             1
  Edit    Delete  7       1       2       indian      up      0
  Edit    Delete  8       1       2       indian      delhi   0
  </code></pre>
  
  <p>There is single root category food which contains 5 category which contains 5 sub category .i want to make function for that by which we can get all fields data as given below:</p>
  
  <pre><code>  food
  
  * indian
    japanis
    chaines 
    american 
    southex
  </code></pre>
  
  <hr>
  
  <pre><code> indian
     up
     delhi
  </code></pre>
  
  <p>in the dropdown please help me.......</p>