1. Go to this page and download the library: Download webgriffe/amp-csv 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/ */
webgriffe / amp-csv example snippets
use Webgriffe\AmpCsv\Iterator;
use Webgriffe\AmpCsv\Parser;
use Amp\File;
open('path/to/file.csv', 'rb')));
while (yield $iterator->advance()) {
$rows[] = $iterator->getCurrent();
}
var_dump($rows);
});
$iterator = new Iterator(new Parser(yield File\open('path/to/file.csv', 'rb')), false);