Page 1 of 1

Highlight current link from a list of links via PHP

Posted: Tue Feb 04, 2003 5:08 pm
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.

Posted: Tue Feb 04, 2003 5:53 pm
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>