flynryan692 Posted July 12, 2010 Share Posted July 12, 2010 This should be simple, I think I am just confusing my self... Ok, so I have a navigation bar at the top.. <div id="nav"> <ul> <li><a href="?page=index"></a></li> <li><a href="?page=blah"></a></li> <li><a href="?page=cool"></a></li> <ul> </div> Ok, so I want to say, if the person is on the "cool" page then <a href=?page=cool class="active" > else <a href=?page=cool > How would I do that efficiently for every single link? Also, I have a drop down, and a submenu in the drop down...aagh. I can post the entire nav bar if needed.. Link to comment https://forums.phpfreaks.com/topic/207479-if-page-navigation/ Share on other sites More sharing options...
bh Posted July 12, 2010 Share Posted July 12, 2010 if (isset($_GET['page'])) { switch ($_GET['page']) { case 'index': { echo 'index'; } break; case 'blah': { echo 'blah'; } break; default: { echo 'no page'; } break; } } Link to comment https://forums.phpfreaks.com/topic/207479-if-page-navigation/#findComment-1084731 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.