8 Years
Discussion Span
Last Post by diafol

If you use Dreamweaver it can create them for you (Spry>Menu) but this is realy much more to do with HTML, CSS and Javascript than PHP


Can anyone help me in creating a cascading menu of below kind,..

Thanks a lot samarudge,.. But i had tried some how and created cascading menu in php along with javascript and html,...


php won't usually do anything major to a menu that static html can't do. If you are planning on having a menu hierarchy that is apt to change, save the menu to a db and use php do build it. The CSS will do the heavy lifting, although javascript may be useful, depending on what you fancy. CSS-only (i.e. without JS) dropdown/expandable menus used to be the holy grail, but they are quite common now.

If you are using php to build the menu, you'll need a really good db structure to hold the info, I usually use:

id (autoincrement)
label (caption on navbar)
alt (the 'title' for rollover)
url (the page to open)
target (e.g. _blank)
parent_id (this is 0 as default - top level, but if value not 0, it takes the id of the parent)
rank_item (order in which the item appears)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.