Thanks, I'll try that.
This is what I've got so far:
$mainmenu = array
(
"PHP" => "php.php",
"MySQL" => "mysql.php",
"Forum" => "forum.php",
"Om" => "om.php",
"Hjelp" => "hjelp.php",
"Index" => "index.php"
);
asort ($mainmenu);
reset ($mainmenu);
while (list ($mainpage_name, $mainpage_filename) = each ($mainmenu))
{
$currentpage = (basename("$PATH_INFO"));
if($currentpage == "$mainpage_filename")
{
echo ("<br><b><FONT color=\"#FF0000\">$mainpage_name</FONT></b>");
}
else
{
echo ("<br><small><A href=\"$mainpage_filename\">$mainpage_name</A></small>");
}
}
This makes links to all but the current page, I'll try to extend this to include submenus.
Is this code crap ppl?
Steinar.