Ul LI Menu creation using foreach loop |
[eluser]Paleleaves[/eluser]
Hi, Anybody can give a hand to create a UL LI menu using foreach loop. Values are already there, only need the help to create the menu levels. Below is the static code of the menu. Code: <ul> <!-- This is outer portion. No need to add in the loop --> Please see the attached file for how the result looks. Anybody can give a foreach loop sample code it would be great! Thanks in advance
[eluser]Maurice Calhoun[/eluser]
Have you tried this.... http://codeigniter.com/wiki/Generatic_List_Generator/
[eluser]nuwanda[/eluser]
It's basic php. You need to start with an array of your li items. Then loop over the array, constructing each li with the contents of the array.
[eluser]Paleleaves[/eluser]
Yes, I don't understand the table structure they recommened for this helper. http://codeigniter.com/wiki/Generatic_List_Generator/ Is it a single table or multiple table. In my case I'm creating the menu using two different tables but linked. |
Welcome Guest, Not a member yet? Register Sign In |