Imports and parses a CSV file.
public importFile ( string $filename, boolean $header = false, string $sep = ',', string $quote = '', integer $fields = null, $import_mapping = [], string $charset = null, string $crlf = null ) : array | ||
$filename | string | The name of the file to parse. |
$header | boolean | Does the first line contain the field/column names? |
$sep | string | The field/column separator. |
$quote | string | The quoting character. |
$fields | integer | The number or fields/columns. |
$charset | string | The file's charset. |
$crlf | string | The file's linefeed characters. |
return | array | A two-dimensional array of all imported data rows. If $header was true the rows are associative arrays with the field/column names as the keys. |