note 74708 deleted from function.DirectoryIterator-isFile by nlopess

From: Date: Tue, 01 May 2007 13:45:57 +0000
Subject: note 74708 deleted from function.DirectoryIterator-isFile by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-126058@lists.php.net to get a copy of this message
Note Submitter: DieselDriver at edu dot uni-klu dot ac dot at ---- shows all .jpg files in the current directory but how does the DirectoryIterator sort the output!? $dir=new DirectoryIterator("./"); foreach ($dir as $file) { if ($dir->isDot()) {continue;} //removes . and .. if (strripos($file,".jpg")==true) { echo $file . "<br>\n"; } }

« previous php.notes (#126058) next »