This script puts all file names that are in the directory into an array. I would like to built the array with only image type files. (.jpg, .gif, .bmp, etc).
How would that be coded.
<?php
$PhotoDir = "photos/";
$FilesInDir = scandir($PhotoDir, 0);
echo "<strong>These files are in the directory.</strong><br />";
for($i=0; $i<count($FilesInDir); $i++)
{
print("$FilesInDir[$i]<br>\n");
}
?>
Sam
: