Skip to content

A CSV reader based on iterators. Offers better support for line endings

License

Notifications You must be signed in to change notification settings

cfv1000/csv-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv-reader

A CSV reader based on iterators. Offers better support for line endings

Features

  • custom line endings
  • ability to pause / resume reading

usage

use cfv1000\CsvReader\Reader;

$csv = new Reader($filename);
// $csv->seek(); jump to specified pointer. Suggestion: only use values returned by $csv->tell(). Will cause weird results otherwise. (if reading from the middle of the line, for example) 
foreach($csv as $csvLine)
{
 // print $csv->tell(); -> returns current position in the file
 print_r($csvLine);
}