PHP code example of monokakure / laravel-csv

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

    

monokakure / laravel-csv example snippets


'Monokakure\CSV\CSVServiceProvider',

'CSV'=> 'Monokakure\CSV\CSVFacade',

CSV::create($arr, $header);

CSV::create($arr, $header)->build();

CSV::setEncode('SJIS-win', 'UTF-8')->create($arr, $header)->build();

CSV::create($arr, $header)->setBOM_UTF8()->build();
CSV::create($arr, $header)->setBOM_UTF16LE()->build();

CSV::create($arr, $header)->setDelimiter("\t")->build();

CSV::create($arr, $header)->render();

CSV::parse('sample.csv');