I\'ve setup a menu for a fairly simple site based on icant.co.uk. It\'s fairly simple with maybe 5 pages. The small site is mainly a mysql browser for a few tables using MATE.
Not sure if that's what you meant, but this way you'll get rid of this ugly if-else:
$currentFile = Explode('/', $_SERVER["PHP_SELF"]);
$currentFile = $currentFile[count($currentFile) - 1];
// easier to manage in case you want more pages later
$pages = array(
array("file" => "orders.php", "title" => "Orders"),
array("file" => "customers.php", "title" => "Customer List")
);
$menuOutput = '';
foreach ($pages as $page) {
$activeAppend = ($page['file'] == $currentFile) ? ' id="active"' : "";
$menuOutput .= '- '
. '' . $page['title'] .''
. '
';
}
$menuOutput .= '
';
echo $menuOutput;