jzhang1013
08-28-2009, 04:58 AM
Hey so I have two folders:
- Thumbnails
- Actual Images
I want to write a php script that does the following...
<a href="fetch all actual images as a link"><img src="fetch all thumbnails to display"></a>
Here is my code to fetch all the thumbnails, but don't know how to do the link part...
<?php
$dirname = "./thumbnails";
$images = scandir($dirname);
$ignore = Array(".", "..", "error_log");
foreach($images as $curimg){
if(!in_array($curimg, $ignore)) {
echo "<li><img src='./thumbnails/$curimg' /></li>";
};
} *
?>
How would I go about doing this?
- Thumbnails
- Actual Images
I want to write a php script that does the following...
<a href="fetch all actual images as a link"><img src="fetch all thumbnails to display"></a>
Here is my code to fetch all the thumbnails, but don't know how to do the link part...
<?php
$dirname = "./thumbnails";
$images = scandir($dirname);
$ignore = Array(".", "..", "error_log");
foreach($images as $curimg){
if(!in_array($curimg, $ignore)) {
echo "<li><img src='./thumbnails/$curimg' /></li>";
};
} *
?>
How would I go about doing this?