Do it the same way you select option out of a SELECT list w/ PHP. Check $PHP_SELF or similar, and if it matches the current page, write the <span> tags.
<?php if ($PHP_SELF=='forum.php') {?>
<span class='here'>Forum</span>
<?php } else { ?>
<a href='forum.php' class='nav'>Forum</a>
<?php } ?>
And similar for the other links in the bar.
Then, a more sophisticated approach would be to put all this in a loop:
$navlinks = array (
array (
'href'=>'index.php',
'label'=>'Home'),
array(
'href'=>'forum.php',
'label'=>'Forum'),
//...etc.
);
foreach($navlinks as $navlink)
{ if ($PHP_SELF==$navlink['href'])
echo "<span class='here'>$navlink[label]</span>";
else
echo "<a href='$navlink[href]'>$navlink[label]</a>";
}
Then adjusting the contents of the navbar would be a matter of adjusting the $navlinks array.