how to bult N Type category tree with php?
<p>we have this table "Categoris"</p>

<pre><code>------------------------------------
| ID  |parent.id | Category Name   |
|  1  |    0     |  php            |
|  2  |    1     |  Jquery         |
|  3  |    2     |  Java script    |
|  4  |    2     |  HTML           | 
|  5  |    4     |  CSS            |
|  6  |    1     |  word Press     |
|  7  |    3     |  DOM            |  
</code></pre>

<p>Output should be</p>

<pre><code>PHP-&gt;Jquery
   -&gt;wordpres
Jquery-&gt;java Script
      -&gt;HTML
Java Script-&gt;DOM
HTML-&gt; CSS
Word Press
DOM
</code></pre>
