czproject/csv-iterator
Simple reading of CSV files.
Maintainers
Fund package maintenance!
v1.5.0
2025-06-10 18:27 UTC
Requires
- php: 8.0 - 8.4
Requires (Dev)
- nette/tester: ^2.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
BSD-3-Clause 8cb098da34ec51d1bda3c5b257108dcf75c43489
README
👁 Build Status
👁 Downloads this Month
👁 Latest Stable Version
👁 License
Simple reading of CSV files.
Installation
Download a latest package or use Composer:
composer require czproject/csv-iterator
CsvIterator requires PHP 8.0 or later.
Usage
id,name 1,Gandalf The White
$iterator = new CzProject\CsvIterator\CsvIterator('/path/to/file.csv'); // optional: $iterator->setDelimiter(','); $iterator->setEnclosure('"'); $iterator->setEscape('\\'); $iterator->setEncoding('UTF-8'); while (($row = $iterator->fetch()) !== NULL) { echo $row['id']; // prints '1' echo $row['name']; // prints 'Gandalf The White' }
License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/
