PHP code example of ajgl / csv

1. Go to this page and download the library: Download ajgl/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/ */

    

ajgl / csv example snippets


$csv = Ajgl\Csv\Csv::create();

$csv->setDefaultReaderType('rfc');
$csv->setDefaultWriterType('rfc');

$reader = $csv->createReader('/path/to/input.csv');
$writer = $csv->createWriter('/path/to/output.csv');