title: multi level category listings / tree php function
body: <p>I'm looking for a php function or mysql stored procedure which outputs the following:</p>
  
  <pre><code>1: category 1 &gt; category 2 &gt; category 3 &gt; category 4
  2: category 1 &gt; category 2 &gt; category 3 &gt; category 4
  ...
  n: category n &gt; category o &gt; category p &gt; category p
  </code></pre>
  
  <p>so basically i want <strong>last level category id</strong> and <strong>text which display all parent categories in hierarchy</strong> as above. I have the following table:
  categories(id,title,level,parentid);
  level increases with category depth.</p>
  
  <p>I tried much on google but could not find a solution. can you please help me? </p>
  
  <p>thanks
  -Navi</p>