Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $navLinks = array(
- 1 => array($locationHome, 'Home'),
- 2 => array($locationSubscribe, '(Un)Subscribe'),
- 3 => array($locationAbout, 'About'),
- 4 => array($locationLogin, 'Login'),
- );
- if (!isset($navLinks[$nav_id])) {
- echo "An error occurred with loading the navigation";
- return;
- }
- foreach ($navLinks as $id => $linkInfo) {
- ?>
- <a href="<?= $linkInfo[0] ?>" class="menu"><li class="<?= $id == $nav_id ? 'Selected' : 'Unselected' ?>"><?= $linkInfo[1] ?></li></a>
- <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement