Hello Joe, Thanks for your fast reply. I can loop only like this: <ul> <li>Item1</li> <li>Item2</li> <li>Item2a</li> <li>Item2b</li> </ul> It should be look like this with nested list: <ul> <li>Item 1</li> <li>Item 2 <ul> <li>Item 2a</li> <li>Item 2b</li> </ul> </li> </ul> This is database: id - title - link - parentid 1 - Item1 - http://www.yahoo.com - 0 2 - Item2 - http://www.google.com - 0 3 - Item2a - http://www.chhit.com - 2 4 - Item2b - http://www.gmail.com - 2 Could you tell me how to write this kind of loop? Thanks, Vichea On Tue, Jun 1, 2010 at 10:29 PM, Joe Forsythe <jforsythe@xxxxxxxxxxxxxxxxxx>wrote: > > > "The problem is that I cannot loops with php." > > I'm not sure I know what this means. Do you know how to write a loop > in PHP? > -- > Joe > > > [Non-text portions of this message have been removed]