note 75930 added to function.fgetcsv

From: Date: Thu, 21 Jun 2007 20:16:22 +0000
Subject: note 75930 added to function.fgetcsv
Groups: php.notes 
Request: Send a blank email to php-notes+get-127876@lists.php.net to get a copy of this message
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. ---- Server IP: 216.235.15.211 Probable Submitter: 209.112.47.82 ---- Manual Page -- http://www.php.net/manual/en/function.fgetcsv.php Edit -- https://master.php.net/note/edit/75930 Del: integrated -- https://master.php.net/note/delete/75930/integrated Del: useless -- https://master.php.net/note/delete/75930/useless Del: bad code -- https://master.php.net/note/delete/75930/bad+code Del: spam -- https://master.php.net/note/delete/75930/spam Del: non-english -- https://master.php.net/note/delete/75930/non-english Del: in docs -- https://master.php.net/note/delete/75930/in+docs Del: other reasons-- https://master.php.net/note/delete/75930 Reject -- https://master.php.net/note/reject/75930 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#127876) next »