Hi Joan ;D
Here is a quick script i’ve put together for you,
[php]<?php
$page = str_replace(’/’, ‘’, $_SERVER[‘SCRIPT_NAME’]); // get the page name and chop off slash
$pages = array(‘index.php’, ‘home.php’, ‘about.php’); // create an array of pages
// check the page is the pages array
if(in_array($page, $pages))
{
// use a switch to find out which page we are on
switch($page)
{
case ($pages[0]) : // first value in $pages array
echo ‘Your on the index page’;
break;
case ($pages[1]) : // second value in $pages array
echo ‘Your on the home page’;
break;
case ($pages[2]) : // third value in $pages array
echo ‘Your on the about page’;
break;
default : // something weird happened!
echo “I don’t know of this page?!”;
break;
}
}
else // the page is not in the array
{
echo ‘Unknown page!’;
}
?>
[/php]
To use it for yourself, change the pages array to your pages and also my echo statements to do whatever you wish for the page selected,
i hope this helps