link generating script
| From: | Ed Dorsch | Date: | Mon, 25 Apr 2005 15:23:16 +0000 |
| Subject: | link generating script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-213811@lists.php.net to get a copy of this message | ||
I'm scripting a photo gallery page that generates links (1 through $max), sends the selected
number in the url, then displays a set of photos based on the number. However, I want it to display
the number of the current gallery differently than the other numbers. If the browser clicks on
"3" and is looking at gallery "page" three, then I don't want the number
three to be a link -- and maybe it should be bolder or lighter or something. Any ideas? I was
thinking of nesting an "if > then" inside the "for > next" but can't
seem to make anything work.
Thanks,
Ed
THUMBNAIL GALLERY LINK GENERATING SCRIPT: Creates links 1 through 20, then sends the number chosen
in the url. This number is used later to generate a different set of thumbnails for each selected
page:
$max=20;
$max++;
for ($n = 1; $n < $max; $n++)
{print ' <a
href="pag_gallery.php?Pagenum='.$n.'"'.'>'.$n.'</a>';}
print ' <br><br>';
Ed Dorsch
Development Communications
University of Oregon
541.346-0605 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"
/>
"You can't wait for inspiration. You have to go after it with a club."
-Jack London