TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
CsvUtility Class Reference

Static Public Member Functions

static csvToArray ($input, $fieldDelimiter= ',', $fieldEnclosure= '"', $maximumColumns = 0)
 

Detailed Description

Class with helper functions for CSV handling

Definition at line 20 of file CsvUtility.php.

Member Function Documentation

static csvToArray (   $input,
  $fieldDelimiter = ',',
  $fieldEnclosure = '"',
  $maximumColumns = 0 
)
static

Convert a string, formatted as CSV, into an multidimensional array

This cannot be done by str_getcsv, since it's impossible to handle enclosed cells with a line feed in it

Parameters
string$inputThe CSV input
string$fieldDelimiterThe field delimiter
string$fieldEnclosureThe field enclosure
int$maximumColumnsThe maximum amount of columns
Returns
array

Definition at line 33 of file CsvUtility.php.

Referenced by CommaSeparatedValueProcessor\process().