PHP code example of ivanomatteo / csv-read-write
1. Go to this page and download the library: Download ivanomatteo/csv-read-write 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/ */
ivanomatteo / csv-read-write example snippets
use IvanoMatteo\CsvReadWrite\CsvWriter;
(new CsvWriter(__DIR__."/tmp.csv"))
->format(';','"',"\\")
->write(
[
['aaa','bbb', 'ccc'],
['foo','bar', 'baz'],
],
['column1', 'column2', 'column3'] // optional first row
);