note 81434 deleted from function.scandir by nlopess
| From: | nlopess@php.net | Date: | Thu, 28 Feb 2008 10:32:13 +0000 |
| Subject: | note 81434 deleted from function.scandir by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-136550@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
The easiest and most efficient way to skip 'hidden' folders and the obtrusive
'..' & '.' is like so
foreach(scandir('.') as $f) {
if ($f[0]=='.') continue;
//Do your dirty work code monkey strings are arrays!
}
I haven't seen anyone use this simple solution so far so I thought I'd share it