note 81433 deleted from function.scandir by felipe
| From: | felipe@php.net | Date: | Fri, 29 Aug 2008 23:28:10 +0000 |
| Subject: | note 81433 deleted from function.scandir by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-144008@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
The easiest 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
}
I haven't seen anyone use this simple solution so far so I thought I'd share it