1. Go to this page and download the library: Download jwage/easy-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/ */
jwage / easy-csv example snippets
$reader = new \EasyCSV\Reader('read.csv');
while ($row = $reader->getRow()) {
print_r($row);
}
print_r($reader->getAll());
// our headers aren't on the first line
$reader = new \EasyCSV\Reader('read.csv', 'r+', false);
// zero-based index, so this is line 4
$reader->setHeaderLine(3);