php - Working with CSV sepereatet with Paragraph -
on git found following script:
function csv_to_array($filename='', $delimiter=';') { if(!file_exists($filename) || !is_readable($filename)) return false; $header = null; $data = array(); if (($handle = fopen($filename, 'r')) !== false) { while (($row = fgetcsv($handle, 1000, $delimiter)) !== false) { if(!$header) $header = $row; else $data[] = array_combine($header, $row); } fclose($handle); } return $data; }
my csv looks this:
testentry1 testentry2 testentry3 testentry4
the data matching each other seperatet paragraph. how rework script can work data ?
greats!
Comments
Post a Comment