Creaing a foldout menu from an array.
| From: | Gregory Machin | Date: | Sun, 07 Aug 2005 16:05:31 +0000 |
| Subject: | Creaing a foldout menu from an array. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-220174@lists.php.net to get a copy of this message | ||
Hi
Please advise.
I need to create menu that has the following html
<body>
<ul id="nav">
<li><a href="#">Home</a></li>
<li><a href="#">About</a>
<ul>
<li><a href="#">History</a></li>
<li><a href="#">Team</a></li>
<li><a href="#">Offices</a></li>
</ul>
</li>
<li><a href="#">Services</a>
<ul>
<li><a href="#">Web Design</a></li>
<li><a href="#">Internet
Marketing</a></li>
<li><a href="#">Hosting</a></li>
<li><a href="#">Domain Names</a></li>
<li><a href="#">Broadband</a></li>
</ul>
</li>
<li><a href="#">Contact Us</a>
<ul>
<li><a href="#">United Kingdom</a></li>
<li><a href="#">France</a></li>
<li><a href="#">USA</a></li>
<li><a href="#">Australia</a></li>
</ul>
</li>
</ul>
</body>
The menu is structured with an array where each field holds an ID a
PerantID the name and the link .
the PeratID refers to the ID of the item in the array wich it is attached to..
My problem is I cant figure out the correct loop / logic to put the
<ul> tags in the rite places etc..
Many thanks
--
Gregory Machin
greg@linuxpro.co.za
gregory.machin@gmail.com
www.linuxpro.co.za
Web Hosting Solutions
Scalable Linux Solutions
www.iberry.info (support and admin)
www.goeducation (support and admin)
+27 72 524 8096