php easy :: one-level site menu builder script


This script is intended to build your 1-level site menu on-the-fly according to menu titles/links array defined within the script. Now you do not have to write different HTML code for each page to highlight the current page in the menu, simply include the menu builder via php include() directive script and it will identify and highlight the appropriate menu item by itself. The function can be easily customized to modify the output layout.


  1. Specify the appropriate pairs for menu titles/links in $menu array within menu.php script.
  2. Upload modified menu.php file to the root folder on your server.
  3. Replace your current html-coded menu with <?include("menu.php");?> within all your php pages.
  4. Link to menu.css file from your pages to stylize menu links.

Online DEMO

  • See this site top menu :-)


Download the script (3kb).

Valid XHTML 1.0 Strict Valid CSS!