cyrille37/php-csv-reader

Simple & efficient CSV reader for Php

v1.2 2022-10-03 11:17 UTC

This package is auto-updated.

Last update: 2024-05-30 01:05:54 UTC


README

Simple CSV Reader for Php.

Can read large file without consuming memory because it uses an iterator with a Generator that only read one line at a time.

Give access to columns by their "name".

Install

composer require cyrille37/php-csv-reader

Usage

$csv = new CsvReader( 'foo.csv' );
foreach( $csv->getRows() as $row )
{
    echo $row['some column name'];
}
$csv_separator = ';' ;
$csv = new CsvReader( 'foo.csv', $csv_separator );