note 37660 deleted from ref.filesystem by pollita
| From: | pollita@php.net | Date: | Sat, 22 Nov 2003 02:01:16 +0000 |
| Subject: | note 37660 deleted from ref.filesystem by pollita | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-60797@lists.php.net to get a copy of this message | ||
Note Submitter: Tra'Hari Vandaette, tra_hari@hotmail.com
----
Jazeps Basko, the false/true checking was taken from the PHP readdir page:
http://us3.php.net/manual/en/function.readdir.php
Here's the part:
<?php
/* This is the correct way to loop over the directory. */
while (false !== ($file = readdir($handle))) {
echo "$file\n";
}
/* This is the WRONG way to loop over the directory. */
while ($file = readdir($handle)) {
echo "$file\n";
}
?>