top nav auto highlight


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <div id="horiznav">
  2. <ul>
  3. <?php
  4.  
  5. function highlight($a) {
  6.  
  7. global $sec;
  8.  
  9. if ($sec == $a) {
  10. echo " id=\"current\"";
  11. }
  12. }
  13. ?>
  14. <li><a href="http://kates-playground.info/"<?php
  15. highlight(1);
  16. ?>>Home</a></li>
  17. <li><a href="http://kates-playground.info/kates-playground-news.php"<?php highlight(2); ?>>Kates Playground News</a></li>
  18. <li><a href="http://kates-playground.info/kates-playground-naked.php"<?php highlight(3); ?>>Kates Playground Naked</a></li>
  19. <li><a href="http://kates-playground.info/kates-playground-pics.php"<?php highlight(4); ?>>Kates Playground Pics</a></li>
  20. <li><a href="http://kates-playground.info/kates-playground-vids.php"<?php highlight(5); ?>>Kates Playground Vids</a></li>
  21. <li><a href="http://kates-playground.info/sitemap.php"<?php highlight(7); ?>>Sitemap</a></li>
  22. <li><a href="http://kates-playground.info/seemore.php"<?php highlight(6); ?>>Official Site</a></li>
  23. </ul>
  24. </div>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.