PHP code example of cfv1000 / csv-reader
1. Go to this page and download the library: Download cfv1000/csv-reader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cfv1000 / csv-reader example snippets
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);
}