Re: fgetcsv doesn't return an array?
| From: | Jay Blanchard | Date: | Fri, 16 Mar 2012 13:42:46 +0000 |
| Subject: | Re: fgetcsv doesn't return an array? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317052@lists.php.net to get a copy of this message | ||
[snip]
Not sure why, but ok. Thanks everyone!
An empty line would lead to $csvCurrentLine == array() which as a boolean would be false but would not necessarily mean EOF. By using === to check the value the expression will only evaluate to false at EOF or an error. -Stuart [/snip]Makes perfect sense! I just wasn't reading it right.