On 15 Mar 2012, at 20:26, Jay Blanchard wrote: > [snip] >> Please, don't do that. Use this instead: >> while (($csvCurrentLine = fgetcsv($csvFile, 4096, ',')) !== FALSE) { >> } >> [/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 -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php