note 102763 deleted from function.str-getcsv by danbrown

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: depely AT IAMNOTABOT prestaconcept.net 

----

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;
}
 
} ?>
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.