Recursive PHP/MySQL list menu
Posted: Fri Dec 12, 2008 4:22 pm
Can someone solve my issue please?
I want to produce this:-
<ul>
<li>Home</li>
<li>About</li>
<ul>
<li>About sub menu</li>
<ul>
<li>Under that</li>
etc etc etc
</ul>
</ul>
</ul>
A limitless recursive menu basically.
I have my DB set up =>[ id,name,parent_id ] with parent_id linking to id and so forth.
I have tried all sort of tricks to achieve this but failed so I have come here wondering if anyone else has had the same issue and found a resolution to it.
Once I have achieved a nested list I can use JavaScript/CSS to function it and make it nice.
If anyone has the solution I need I would be extremely thankful!
Thank you in advance...
I want to produce this:-
<ul>
<li>Home</li>
<li>About</li>
<ul>
<li>About sub menu</li>
<ul>
<li>Under that</li>
etc etc etc
</ul>
</ul>
</ul>
A limitless recursive menu basically.
I have my DB set up =>[ id,name,parent_id ] with parent_id linking to id and so forth.
I have tried all sort of tricks to achieve this but failed so I have come here wondering if anyone else has had the same issue and found a resolution to it.
Once I have achieved a nested list I can use JavaScript/CSS to function it and make it nice.
If anyone has the solution I need I would be extremely thankful!
Thank you in advance...