1. Go to this page and download the library: Download hoalqq/commoncsv 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/ */
hoalqq / commoncsv example snippets
use Hoalqq\Commoncsv\Commoncsv;
// create a object
$filename = '会員種別.csv';
$header = ['会員種別', 'メールアドレス', 'モバイル会員番号'];
$data = [
['取引回','単価','金額'],
['取引回','単価','金額']
];
$test = new Commoncsv($filename,$header,$data);
// add attribute to the object
$test->setShowHeader(false); // true is show header, false is not show, default is true
$test->downloadFile();// call function make output file