PHP code example of mohammedmanssour / fast-csv
1. Go to this page and download the library: Download mohammedmanssour/fast-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/ */
mohammedmanssour / fast-csv example snippets
FastCSV::exporter()
->header(["One", "Two", "Three"])
// data can be an array or any object that implements that iterator pattern
->data([
["Line 1: One", "Line 1: Two", "Line 1: Three"],
["Line 2: One", "Line 2: Two", "Line 2: Three"],
])
->toFile(__DIR__ . '/some.csv') // the target file
->export();