Documentation

ImportCSV
in package

Facilitates the cimple importing of CSV files Loads up the CSV and allows for sequential reading of the file as data records.

Table of Contents

Properties

$handle  : mixed
$headings  : mixed

Methods

__construct()  : mixed
Opens a CSV for reading
getHeadings()  : mixed
Get the headings of this CSV
getLine()  : mixed
Get a line of the CSV
getNamedLine()  : mixed
Get a line, and transpose the header line, to create an assoc. array of data

Properties

Methods

__construct()

Opens a CSV for reading

public __construct(string|resource $filename[, array<string|int, mixed>|null $headings = null ]) : mixed
Parameters
$filename : string|resource

If a string, the file with that name will be opened as a resource

$headings : array<string|int, mixed>|null = null

Headings for the columns in the CSV. If not provided, they will be extracted from the first row of the CSV

getHeadings()

Get the headings of this CSV

public getHeadings() : mixed

getLine()

Get a line of the CSV

public getLine() : mixed

getNamedLine()

Get a line, and transpose the header line, to create an assoc. array of data

public getNamedLine() : mixed
On this page

Search results