note 118122 added to function.file

From: Date: Wed, 07 Oct 2015 15:49:23 +0000
Subject: note 118122 added to function.file
Groups: php.notes 
Request: Send a blank email to php-notes+get-203925@lists.php.net to get a copy of this message
Martin K.'s post quoted: "If the file you are reading is in CSV format do not use file(), use fgetcsv(). file() will split the file by each newline that it finds, even newlines that appear within a field (i.e. within quotations).". He is right. However, in my case, fgetcsv has problem on dealing with Chinese characters, so I can't use it either. I'm currently trying to figure out how to read in a csv line that has linefeed character in some field's contents from a csv file pleasantly though there are some ugly ways to do it. ---- Server IP: 72.52.91.14 Probable Submitter: 61.62.135.63 ---- Manual Page -- http://php.net/manual/en/function.file.php Edit -- https://master.php.net/note/edit/118122 Del: integrated -- https://master.php.net/note/delete/118122/integrated Del: useless -- https://master.php.net/note/delete/118122/useless Del: bad code -- https://master.php.net/note/delete/118122/bad+code Del: spam -- https://master.php.net/note/delete/118122/spam Del: non-english -- https://master.php.net/note/delete/118122/non-english Del: in docs -- https://master.php.net/note/delete/118122/in+docs Del: other reasons-- https://master.php.net/note/delete/118122 Reject -- https://master.php.net/note/reject/118122 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203925) next »