is the nav an include?
or is it hard coded on very page?
if it is hard coded then just add the class='current'
and build out the css to reflect that.
if it is included then you'll need to strip the url
preg_match('/[^?]*/', $filepath, $matches);
$string = $matches;
#split the string by the literal dot in the filename
$pattern = preg_split('/\./', $string, -1, PREG_SPLIT_OFFSET_CAPTURE);
#get the last dot position
$lastdot = $pattern[count($pattern)-1];
#now extract the filename using the basename function
$filename = basename(substr($string, 0, $lastdot-1));
#return the filename part
then call it
$str = $_SERVER['SCRIPT_NAME'];
This should give you the file name
Then run it through the build array with a conditional that determines which page you should high light.
kind of what was in the first reply you may have to tweek it.