In first I have original images. And in the second folder I have thumbs with the same name. I want to show thumbs and link to original. How can I do it?
<html><?php
$folder = "img";
$img_array = glob("$folder/*.*");
arsort($img_array);
if (!count($img_array)) {
echo"ERROR - no images in folder!"; die;
}
foreach($img_array as $key => $value) {
?>
<a href="<?php echo $value; ?>"><img src="<?php SOMETHING THERE ?>" /></a>
<?php } ?>
</html>
Folder with original images: img
Folder with thumbs: img/thumbs
I want:
<a href="img/image1.jpg"><img src="img/thumbs/image1.jpg" /></a>