kothman / csv-parser
A CSV parser for PHP
1.0.1
2016-07-18 19:49 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: 5.4.* | 4.8.*
This package is not auto-updated.
Last update: 2025-01-10 23:41:05 UTC
README
A CSV Parser for PHP.
Install
Via Composer
$ composer require kothman/csv-parser
Usage
$parser = new Kothman\CSVParser("file.csv"); while($row = $parser->row()) { echo implode(", ", $row); } $parser->rewind(); $parser->row(); $anotherParser = new Kothman\CSVParser("https://some.csv.file.csv", $delimeter = '.'); echo $anotherParser->toDictionary(); echo $anotherParser->countColumns(); echo $anotherParser->countRows();
Testing
$ composer test