Displaying n'th level category in php
<p>below is my SQL table</p>

<pre><code>id   parent_id

1      0
2      0
3      1
4      1
5      3
6      5
</code></pre>

<p>i want to display n'th level hierarchic relation in array like below</p>

<pre><code>array
{
  1
    sub{
         3
           sub{
               5
           }
         4
        }
 }
</code></pre>

<p>and so on</p>

<p>how can i do this in PHP</p>
