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); } ?> Quote Link to comment Share on other sites More sharing options...
Maverickb7 Posted April 4, 2007 Author Share Posted April 4, 2007 Anybody? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.