News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPro.org:
Dynamically Create Menu With PHP DOM
July 20, 2009 @ 10:50:52

New from Kevin Waterson on the PHPro.org site is this tutorial looking at dynamically making a website menu with PHP's DOM functionality.

Most PHP coders will have their own menu generation class that will take an array or an item and add it to a HTML un-ordered list or other tag and the styling is handled with CSS. This has proven to be a worthy solution to menu creation, however, PHP already has all the tools and classes built in to create a menu using DOM. It is both powerful and extensible and further eliminates for yet another class in your tree.

The tutorial shows you how to create a simple XML document to define the menu using the DOM functionality in PHP and finally output it as a series of unordered lists that can be styled in whatever way you want.

0 comments voice your opinion now!
xml dom menu dynamic


blog comments powered by Disqus

Similar Posts

Developer Tutorials Blog: Easy Screen Scraping in PHP with the Simple HTML DOM Library

Arnold Daniels' Blog: How I PHP: The Output Handler - Continued

Rob Richards Blog: New XML Features and WSSE and ext/soap

Frikk.tk: How to make your own CAPTCHA protection using PHP

Jani Hartikainen's Blog: Zend_Acl part 3: creating and storing dynamic ACLs


Community Events

Don't see your event here?
Let us know!


conference podcast performance laravel voicesoftheelephpant language release api symfony2 series example opinion application part2 framework introduction php7 configure community interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework