1. Go to this page and download the library: Download keboola/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/ */
keboola / csv example snippets
$csvFile = new Keboola\Csv\CsvReader(__DIR__ . '/_data/test-input.csv');
foreach($csvFile as $row) {
var_dump($row);
}
$csvFile = new \Keboola\Csv\CsvFile(
$fileName,
CsvFile::DEFAULT_DELIMITER,
CsvFile::DEFAULT_ENCLOSURE,
CsvFile::DEFAULT_ESCAPED_BY,
1
)
foreach($csvFile as $row) {
var_dump($row);
}