Advertisement
cafreak

PHP Navigation Bar with array

Apr 20th, 2014
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @$nav_normal = array(
  2.     "Home" => $locationHome,
  3.     "(Un)Subscribe" => $locationSubscribe,
  4.     "About Us" => $locationAbout,
  5.     "Login" => $locationLogin
  6.     ); //this will be the list of the public visible nav bar links
  7. @$nav_acp = array();
  8.  
  9.  
  10. //$Nav_ID will be set for each page manually as E.G Home
  11. if(in_array($Nav_ID,$nav_normal)){
  12.  
  13. //so if $Nav_ID equals in the nav_normal array then it uses the foreach loop I created...
  14. //but how can I check if nav_id is in the list (home is in the list but the nav isn't showing...)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement