I can t seem to figure this out
Im reading the directory like this
$directorylist [0];
$curent_dir = “path to directory";
$dir = opendir($curent_dir);
$count = 0;
while ($file = readdir($dir)){
$directorylist [$count] = $file;
$count = $count + 1;
}
I want to only read in a certain file type (.gif for example or .tga). How can I ensure only these files make it into the array directorylist.
Thanks