note 44851 deleted from faq.using by aidan
| From: | aidan@php.net | Date: | Wed, 18 Aug 2004 06:26:41 +0000 |
| Subject: | note 44851 deleted from faq.using by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-74860@lists.php.net to get a copy of this message | ||
Note Submitter: TheEvilPenguin at gmail
----
This should work:
$n = 0;
if ($handle = opendir('/path/to/files'))
{
while (false !== ($file = readdir($handle)))
{
n++;
}
closedir($handle);
}
I think there may be a shorter way, but in the meantime that will work :)
(more information in the php docs under opendir() )