PHP code example of fordbedia / simple-csv-writer

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

    

fordbedia / simple-csv-writer example snippets


use SimpleCSVWriter\SimpleCSVWriter;

$csv = new SimpleCSVWriter('testcsv--with-instantiation');

$arr = [
  'Row 1',
  'Row 2',
  'Row 3',
  'Row 4',
  'Row 5',
  'Row 6',
  'Row 7'
];

$csv->addRow($arr);