note 75930 deleted from function.fgetcsv by danbrown

From: Date: Sun, 17 May 2009 18:10:16 +0000
Subject: note 75930 deleted from function.fgetcsv by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155071@lists.php.net to get a copy of this message
Note Submitter: myrddin at myrddin dot myrddin ---- RE post by:- stinkyj at gmail dot com 02-Aug-2006 10:15 the enclosure param defaulting to " and giving a warning if it's an empty string makes this function nearly worthless. csv files do not always have the fields enclosed, and in those cases it doesn't work. --------- I had the same problem with this as well, enclosure really should be possible to be made null. However, perhaps a solution to the problem is to use "\n" as the enclosure character in fgetcsv. As far as I tested it seems to work out just fine. I was thinking of using "\0" but that may cause problems with some data files. If anyone knows of any issues that might crop up when using "\n" as enclosure, please post away. Thanks.

« previous php.notes (#155071) next »