Displaying child categories indefinitely with PHP
<p>I don't know if this is possible with the current DB schema, but here goes. I have main categories, these are simply marked with a boolean value in the DB. Then there is a comma-delimited list of subcategories.</p>

<p>For example:</p>

<pre><code>MainCat1
    SubCat1
        SubCat2
        SubCat2-1
            Subcat3
</code></pre>

<p>So in MainCat1's subcategory field there would simply be "SubCat1" and in SubCat1's subcategory field there would be "SubCat2, SubCat2-1" and so forth.</p>

<p>I hope that makes sense! I don't mind how you show it, they will eventually be nested lists.</p>

<p>DB Schema:</p>

<pre><code>id        |maincat  |       subcats     |
---+---------+--------------------------+
MainCat1  |    1    |SubCat1            |
SubCat1   |    0    |SubCat2, SubCat2-1 |
SubCat2   |    0    |                   |
SubCat2-1 |    0    |SubCat3            |
SubCat3   |    0    |                   |
</code></pre>
