Highlight current link from a list of links via PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
douglasrhiner
Forum Newbie
Posts: 1
Joined: Tue Feb 04, 2003 5:08 pm
Location: Lake Tahoe, CA, USA

Highlight current link from a list of links via PHP

Post by douglasrhiner »

I am developing a searchable catalog of images with navigation utilizing block navigation. A search of our catalog returns results containing several pages of thumbnail images, each with a corresponding sequentially numbered link referring to more result pages.
I want the link that referrs to the current page to be highlighted so as to show that the viewer is at that link(page).
Make sense?

I'm not to sure if the solution to this a PHP or CSS scenario.
I've been searching around for a solution, maybe I'm not using the right nomenclature.
User avatar
lazy_yogi
Forum Contributor
Posts: 243
Joined: Fri Jan 24, 2003 3:27 am

Post by lazy_yogi »

u mean something like this :

Code: Select all

<html><body vlink = blue alink = blue link = blue><center><b>

<?
display ("link1");
display ("link2");
display ("link3");
display ("link4");

function display($str) &#123;
  global $page;
  if ($page == $str)  
    print "&#1111; <a href=index.php?page=$str><font color=teal>$str</font></a> ]";
  else
    print "&#1111; <a href=index.php?page=$str>$str</a> ]";
&#125;
 ?>

</body></html>
Post Reply