You can simply use dreamweaver to accomplish this without even having to write an line of code. You can connect to you database in dreamweaver and create a record set and then insert a dynamic list menu reading it's data from your record set done. On Tue, Jun 1, 2010 at 6:08 PM, Sovichea SOU <svch_sou@xxxxxxxxxxx> wrote: > $sql = "SELECT * FROM menu"; > $rows = mysql_query($sql, $con); > > if(mysql_num_rows($rows > 0)){ > > while($record = mysql_fetch_array($rows)){ > $title = $record["title"]; > echo "<li>$title</li>"; > > > } > > > } > > On Tue, Jun 1, 2010 at 10:57 PM, Joe Forsythe > <jforsythe@xxxxxxxxxxxxxxxxxx>wrote: > > > > > > > What is the PHP code that you're using right now? > > -- > > Joe > > > > > > On Jun 1, 2010, at 10:41 AM, Sovichea SOU wrote: > > > > > 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 <jforsythe%40mosaiccreative.com>>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] > > > > > > > > > [Non-text portions of this message have been removed] > > > > ------------------------------------ > > Are you looking for a PHP job? > Join the PHP Professionals directory Now! > http://www.phpclasses.org/jobs/ > Yahoo! Groups Links > > > > -- "Ring the bells that still can ring. Forget your perfect offering.There is a crack in everything, That's how the light gets in." ~Leonard Cohen [Non-text portions of this message have been removed]