note 102763 added to function.str-getcsv

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
The previous anonymous function only read the first line:

<?php if (!function_exists('str_getcsv')) {
 
function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=null, $eol=null) {
  $temp=fopen("php://memory", "rw");
  fwrite($temp, $input);
  fseek($temp, 0);
  $r = array();
  while (($data = fgetcsv($temp, 4096, $delimiter, $enclosure)) !== false) {
    $r[] = $data;
  }
  fclose($temp);
  return $r;
}
 
} ?>
----
Server IP: 195.221.21.36
Probable Submitter: 83.154.183.67
----
Manual Page -- http://www.php.net/manual/en/function.str-getcsv.php
Edit        -- https://master.php.net/note/edit/102763
Del: integrated  -- https://master.php.net/note/delete/102763/integrated
Del: useless     -- https://master.php.net/note/delete/102763/useless
Del: bad code    -- https://master.php.net/note/delete/102763/bad+code
Del: spam        -- https://master.php.net/note/delete/102763/spam
Del: non-english -- https://master.php.net/note/delete/102763/non-english
Del: in docs     -- https://master.php.net/note/delete/102763/in+docs
Del: other reasons-- https://master.php.net/note/delete/102763
Reject      -- https://master.php.net/note/reject/102763
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.