When I can use PHP for a project (that is not powered by a CMS), I usually use a PHP array to construct the menu(s). It's quite easy to add, move or delete pages from an array, and by letting PHP output this as a real menu, you don't have to rewrite the same code over and over.
To specify what page should be considered as active, you can use a code similar to this:
$currentPage = "b.php";
Note that I use a full file name on purpose. I'll explain in a short bit why.
As each menu item requires at least two variables (name, url), I use an array inside the menu's array for each entry. An example:
$menu = array(array("a.php", "A Title"), array("b.php", "B Title"), array("c.php", "C Title"));
Now, in order to let PHP work it's magic, I use a foreach loop that runs through each item and displays it in whichever way I want.
foreach($menu as $num => $options){
$s = ((isset($activePage) && $options[0] == $activePage) OR ($options[0] == basename($_SERVER['PHP_SELF'])) ? " class=\"active\"" : "";
echo "\n\t<li{$s}><a href=\"" . $options[0] . "\">" . $options[1] . "</a></li>";
}
You can expand this concept to include targets, title tags, etc.
The beauty of this way is that you don't have to write all that much for every project. You can just copy/paste it all, and change the little bits in the $menu array, and if needed (ie. for sub-menu items) specify $currentPage. If $currentPage is not specified, it'll fall back to checking what the current page is (through $_SERVER['PHP_SELF']) and base the active state on that.
I hope I explained it well enough, and that it's good enough for you to use!
(Small disclaimer, I just woke up and wrote this code from scratch. While the concept works –I've been using it for years–, I might've made a typo here and there. Apologies if this is the case!)