note 47497 deleted from function.fgetcsv by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 18:18:42 +0000 |
| Subject: | note 47497 deleted from function.fgetcsv by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155099@lists.php.net to get a copy of this message | ||
Note Submitter:
----
example 1 above goes into an infinte loop if the file name is bad because fgetcsv return a false
result not identical to false but equl to false
to fix this use != instead of !== in the test as shown below it will still work correctly for the
case when the file exists.
while (($data = fgetcsv($handle, 1000, ",")) != FALSE) {