1. Go to this page and download the library: Download jabranr/csv-parser 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/ */
jabranr / csv-parser example snippets
$csv = new Jabran\CSV_Parser();
/* @param: string $str */
$csv->fromString($str);
/* @param: resource $resource (f.e. resource created using fopen()) */
$csv->fromResource($resource);
/* @param: string $path */
$csv->fromPath($path);
/**
* Set $headers true/false to y
*
* @param: boolean $headers (Default: true)
* @return: array
*/
$csv->parse($headers);