Location: PHPKode > scripts > Nested Menus > nested-menus/example.php
<?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();

?>
Return current item: Nested Menus