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

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -