note 89619 added to function.str-getcsv
| From: | Anonymous at osu1 dot php dot net | Date: | Tue, 17 Mar 2009 06:02:16 +0000 |
| Subject: | note 89619 added to function.str-getcsv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152019@lists.php.net to get a copy of this message | ||
For some reason o'connor's code only reads one line of a csv for me... I had to replace
the line
$data = fgetcsv($fp, 1000, $delimiter, $enclosure); // $escape only got added in 5.3.0
with this:
$data;
while (!feof($fp))
{
$data[] = fgetcsv($fp, 0, $delimiter, $enclosure); // $escape only got added in 5.3.0
}
...to get all of the data out of my string (some post data pasted into a textbox and processed only
with stripslashes).
----
Server IP: 64.71.164.2
Probable Submitter: 98.230.50.205
----
Manual Page -- http://www.php.net/manual/en/function.str-getcsv.php
Edit -- https://master.php.net/note/edit/89619
Del: integrated -- https://master.php.net/note/delete/89619/integrated
Del: useless -- https://master.php.net/note/delete/89619/useless
Del: bad code -- https://master.php.net/note/delete/89619/bad+code
Del: spam -- https://master.php.net/note/delete/89619/spam
Del: non-english -- https://master.php.net/note/delete/89619/non-english
Del: in docs -- https://master.php.net/note/delete/89619/in+docs
Del: other reasons-- https://master.php.net/note/delete/89619
Reject -- https://master.php.net/note/reject/89619
Search -- https://master.php.net/manage/user-notes.php