PHP code example of ecommit / csv-table-generator

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

    

ecommit / csv-table-generator example snippets


use Ecommit\CsvTableGenerator\Csv;

$csv = new Csv('/home/test', 'myfilename', array(
    'header' => array(
        'Column A',
        'Column B',
    ),
));

$csv->write(array('Hello', 'world')); //Add line
$csv->write(array('Test1', 'Test2')); //Add line
$csv->close();