What I have is a page of about 150 products with id codes. The page is generated in excel and outputted as html then php calls it and displays on web page.
There are close to 100 images that relate to each product which, when the user clicks product id code the image should open in a new window. All the images are named by their id, ex "id5053.jpg".
Instead of having 100 if statements I thought maybe there would be a way to make an array of all the images in the images folder minus the ".jpg" and use the array to replace all text that is matching in the page with the appropriate <a href> tags.
Anyone know or done this before?
There are close to 100 images that relate to each product which, when the user clicks product id code the image should open in a new window. All the images are named by their id, ex "id5053.jpg".
Instead of having 100 if statements I thought maybe there would be a way to make an array of all the images in the images folder minus the ".jpg" and use the array to replace all text that is matching in the page with the appropriate <a href> tags.
Anyone know or done this before?