I'm confused as to how to use an associative array to produce a menu with a nested UL. For example, the result I'd like to achieve is:
I can get my head around using an array likeCode:<ul> <li><a href="page1.html">Page 1</a></li> <li><a href="page2.html">Page 2</a> <ul> <li><a href="page2-1.html">Page 2-1</a></li> <li><a href="page2-2.html">Page 2-2</a></li> <li><a href="page2-3.html">Page 2-3</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> </ul>
Array("page1.html"=>"Page 1", "page2.html"=>"Page 2");
but I wouldn't know how to end the nested UL or where to store the value for Page 2, for example, when creating the menu.
Any ideas?





Bookmarks