Maverickb7 Posted April 4, 2007 Share Posted April 4, 2007 I would like to list all files within a directory that end with .jpg and .gif. I have the below code at the moment and would appreciate if someone could help me out. Thanks! <?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file\n"; } } closedir($handle); } ?> Link to comment https://forums.phpfreaks.com/topic/45507-dir-jpg-and-gif/ Share on other sites More sharing options...
Maverickb7 Posted April 4, 2007 Author Share Posted April 4, 2007 Anybody? Link to comment https://forums.phpfreaks.com/topic/45507-dir-jpg-and-gif/#findComment-221307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.