PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Zak Johnson   Nested Menus   example.php   Download  
File: example.php
Role: ???
Content type: text/plain
Description: A brief example.
Class: Nested Menus
Author: By
Last change:
Date: 23 years ago
Size: 521 bytes


Class file image Download
<?php include('menu.php'); $submenu = new menu('Sub Menu'); $submenu->add('Sub Item 1', 'link.html', '_top'); $submenu->add('Sub Item 2', 'link.html', '_new'); $main = new menu('Main'); $main->add('Main Item 1', 'link.html'); $main->add('Main Item 2', 'link.html'); $main->add($submenu); $main->add('Main Item 3', 'link.html'); $second = new menu('Secondary Menu'); $second->add('Secondary Item 1', 'link.html'); $second->add('Secondary Item 2', 'link.html'); $main->show(); $second->show(); ?>