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

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

Hai,..
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,...

Member Avatar for diafol

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)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.