You're in luck - I've been coding something similar recently, so it was easy enough to port it into an example for you

Here's the php:
PHP Code:
<?php
// EDIT THIS SECTION ONLY!;
$MenuLinks["yoursite.com/index.php"] = "images/index.gif";
$MenuLinks["yoursite.com/about.php"] = "images/about.gif";
$MenuLinks["yoursite.com/contact.php"] = "images/contact.gif";
// DO NOT EDIT ANYTHING BELOW THIS LINE!;
$CurrentPage = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
foreach( $MenuLinks as $link => $image){
if (strpos($link, "index.") > 0 && !strpos($CurrentPage, "index.") > 0) {
$HomeLink = explode("index.", $link);
$FullLink = "http://www." . $HomeLink[0];
$ShortLink = "http://" . $HomeLink[0];
} else {
$FullLink = "http://www." . $link;
$ShortLink = "http://" . $link;
}
if ($CurrentPage == $FullLink || $CurrentPage == $ShortLink) {
echo "<img class=\"current\" src=\"" . $image . "\" />";
} else {
echo "<a href=\"" . $ShortLink . "\"><img src=\"" . $image . "\" /></a>";
}
}
?>
I'll give you a quick walk-through. The first section creates an array of your menu links and their associated images. The links need to be the full path (without http://www), but the image paths can be relative. The next line after that assigns the current page URL to a string. Finally, the large section compares the current page URL against a few variations of each menu link to check for a match - if it finds one, it sends a different set of HTML back.
It's slightly out of context without seeing it in action with the other files, so I've attached them as a zip archive to this post. Just download, extract, edit the links in the menu.php file to suit your server and you're up and running

The HTML & CSS is only there as an example, and can be changed to anything you want - note that you may want to change the echo statements in menu.php to suit your layout.
Hope this helps, and just ask if you don't follow any of it
Jay