Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. $navLinks = array(
  2.     1 => array($locationHome, 'Home'),
  3.     2 => array($locationSubscribe, '(Un)Subscribe'),
  4.     3 => array($locationAbout, 'About'),
  5.     4 => array($locationLogin, 'Login'),
  6. );
  7.  
  8. if (!isset($navLinks[$nav_id])) {
  9.     echo "An error occurred with loading the navigation";
  10.     return;
  11. }
  12.  
  13. foreach ($navLinks as $id => $linkInfo) {
  14. ?>
  15. <a href="<?= $linkInfo[0] ?>" class="menu"><li class="<?= $id == $nav_id ? 'Selected' : 'Unselected' ?>"><?= $linkInfo[1] ?></li></a>
  16. <?php
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement