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 

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

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

Definition at line 33 of file CsvUtility.php.

Referenced by CommaSeparatedValueProcessor\process().