I used pretty much the same thing in my latest project:
PHP Code:
<li><a <? if ($web=="/" || $web == "/index.php") echo 'id="current"'; ?> href="index.php">home</a></li>
<li><a <? if ($web=="/products.php") echo 'id="current"'; ?> href="products.php">products</a></li>
<li><a <? if ($web == "/contact.php") echo 'id="current"'; ?> href="contact.php">contact</a></li>
Seems to do the job, I'd love to hear if anyone did it better though but I don't think you can improve it much