View Single Post
Old 09-16-2007, 11:22 AM  
Zayne E.
Confirmed User
 
Industry Role:
Join Date: Apr 2002
Posts: 1,383
Quote:
Originally Posted by quantum-x View Post
try
Code:
$links['index.php'] = 'home';
$links['how.php'] = 'how it works';
$links['about'] = 'about us blah blah';

foreach($links as $link => $textLink) echo '<a href="'.$link.'"'.(($_SERVER['REQUEST_URI']==$link)?' class="active"':'').'>'.$textLink.'</a>'
Obviously you can tweak the array to waht you need, and also the output line, but it's simple as.
This works very nicely for the top nav...couldn't figure out how to make it work for what I was trying to accomplish on the bottom nav but very nice...thanks
Zayne E. is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote