PHPBuilder - array based menu



RSS Twitter
Snippets Other

array based menu

by: Rameshwor Maharjan
|
June 18, 2006

Version: 1.0

Type: Full Script

Category: Other

License: GNU General Public License

Description: array based menu



<?
$menu=array("PHP"=>
                                array("Beginners"=>"index.php?mode=php_beginners",
								      "Intermediate"=>"index.php?mode=php_intermediate",
									  "Advance"=>"index.php?mode=php_advance"),
			"ASP"=>
			                    array("Beginners"=>"index.php?mode=asp_beginners",
								      "Intermediate"=>"index.php?mode=asp_intermediate",
									  "Advance"=>"index.php?mode=asp_advance"),
		    "ASP_NET"=>
			                    array("Beginners"=>"index.php?mode=aspnet_beginners",
							         "Intermediate"=>"index.php?mode=aspnet_intermediate",
									  "Advance"=>"index.php?mode=aspnet_advance")
			
            
			); 



foreach($menu as $mainheader => $subheader)
{
  echo($mainheader."<br>");
   foreach($subheader as $name=>$link)
   {
     echo("<a href=".$link.">".$name."</a><br>");
   }
}

?>

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Rameshwor Maharjan

Comment:



Comment:

(Maximum characters: 1200). You have characters left.