Hello Everyone.. I am limited in php but can do basic stuff . Stocked with foreach ( I am not familiar with ) any idea on how to achieve the following : I have right now a request to display all actives pages : <ul> <? $res=mysql_query("SELECT * FROM pages WHERE active='Yes' ORDER BY ordre ASC ") ; while ($row=mysql_fetch_array($res_all)) { echo "<li>page number & section</li>"; ?> </ul> I get results like : - page 1 - A - page 2 - A - page 3 - B - page 4 - B - page 5 - A - page 6 - A - page 7 - A - page 8 - B - page 9 - B - page 10 - A Some of pages I would like to display section B under an other listing that woud like this :
- page 1 - A
- page 2 - A
- page 3 - B
- page 4 -B
- page 8 - B
- page 9 - B
- page 5 - A
- page 6 - A
- page 7 - A
The B section ( set a sub_section ) in DB should be creating a new UL listing inside the menu
Should I use foreach in the request ?
I would really appreciate any help
Thanks
Stef