You are here

public function ParserCSV::setColumnNames in Feeds 6

Same name and namespace in other branches
  1. 7.2 libraries/ParserCSV.inc \ParserCSV::setColumnNames()
  2. 7 libraries/ParserCSV.inc \ParserCSV::setColumnNames()

Specify an array of column names if you know them in advance, or FALSE (which is the default) to unset any prior column names. If no column names are set, the parser will put each row into a simple numerically indexed array. If column names are given, the parser will create arrays with these column names as array keys instead.

File

libraries/ParserCSV.inc, line 111

Class

ParserCSV
Functionality to parse CSV files into a two dimensional array.

Code

public function setColumnNames($columnNames) {
  $this->columnNames = $columnNames;
}