In this link for opening an image, I need it to be able to check if $number.JPG exists, and if it doesnt open $number.html instead.
$pictureicon ="<A href='/graphics/catalog/$number.JPG' rel='shadowbox;height=480;width=640'(this, $number)>
Is this something that's in any way possible? I was thinking something along the lines of making an array : $extension = array("JPG", "html"); and then putting $extension instead of .JPG in the link, but i cant get it working.
I thought of another solution with an if statement, where the code checks if the $number.JPG is opened successfully, else it opens $number.html ... again i just cant get it working.
Any ideas for my little issue? Thanks in advance