Hello,
my first post on PHPBuilder, I'm new to PHP so be easy on me!
I think I know what I'm trying to do, the problem is I just don't know how to do it!
All help/advice appreciated...
I'm writing a basic php page which will display a large image and 12 thumbnails all on the same page.
The page is template based, so the thumbnails will be static links coded into the table - the link calls the image like so: index.php?page=portfolio&image=001
I have managed to make the template so the variable $image loads up the unique image requested after the equals sign.
Also below the image there will be a unique caption printed relevant to the image called forward, I have created using a simple switch statement:
<?php
switch ($image)
{
case 001:
echo "This is the picture caption for image 001";
break;
case 002:
echo "This is the picture caption for image 002";
break;
case 003:
echo "This is the picture caption for image 003";
break;
default:
echo "Please click on a thumbnail";
}
?>
But now comes my problem...
...I am trying to create the variable $caption that can be taken from the individual echo's above and placed in the alt="" tag when loading the $image.
This way, rather than having a generic alt tag for all 12 images (which is fine, but not good enough!) I can have a unique alt tag for each image and of course making it more relevant and accessible for all.
Thankyou in advance