Voting

: max(three, four)?
(Example: nine)

The Note You're Voting On

pasmanik at gmail dot com
9 years ago
I prepared some better function for parsing CSV string.

function csv_to_array($string='', $row_delimiter=PHP_EOL, $delimiter = "," , $enclosure = '"' , $escape = "\\" )
{
$rows = array_filter(explode($row_delimiter, $string));
$header = NULL;
$data = array();

foreach($rows as $row)
{
$row = str_getcsv ($row, $delimiter, $enclosure , $escape);

if(!$header)
$header = $row;
else
$data[] = array_combine($header, $row);
}

return $data;
}

<< Back to user notes page

To Top