View Single Post
Old 09-16-2007, 07:36 AM  
Linguist
Confirmed User
 
Join Date: Apr 2004
Location: Toronto, ON
Posts: 1,706
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
__________________
315-310
Linguist is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote