dev-master
9999999-devExtend PHP's native CSV parsing from the SplFileObject class but provide features to use the first row's values as keys on the remaining rows.
MIT
The Requires
- php >=5.1
The Development Requires
by Mike Frank
Wallogit.com
2017 © Pedro Peláez
Extend PHP's native CSV parsing from the SplFileObject class but provide features to use the first row's values as keys on the remaining rows.
:warning: This is the old unsupported master branch: You should not be referencing this branch directly, and it only exists for projects still referencing
dev-master., (*1)
Extend PHP's native CSV parsing from the SplFileObject class but provide features to use the first row's values as keys on the remaining rows., (*2)
There are other libraries which accomplish the similar thing, but they are memory inefficient and rely on their own (sometimes buggy) parsing implementation., (*3)
<?php
$oCsv = new ParseCsv('users.csv');
$oCsv->firstRowHeader();
foreach($oCsv as $aRow) {
print_r($aRow);
}
Given the example users.csv file:, (*4)
id,firstName 11,Billy
The resulting output will be:, (*5)
Array
(
[id] => 11
[firstName] => Billy
)
$ composer require bluefrg/parsecsv:dev-master
Extend PHP's native CSV parsing from the SplFileObject class but provide features to use the first row's values as keys on the remaining rows.
MIT