Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (4) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2020-09-21 (3 days ago) | Not yet rated by the users | Total: 4 This week: 4 | All time: 10,076 This week: 65 |
Version | License | PHP version | Categories | |||
php-csv-export 1.0 | Custom (specified... | 5 | PHP 5, Files and Folders |
Description | Author | ||||||||
This package can export array data to a CVS file to be downloaded. |
|
A simple & lightweight csv export package for PHP
You can start it from composer. Go to your terminal and run this command from your project root directory.
composer require hashemi/php-csv-export
After Complete installation, It's time to check how to use.
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Hashemi\CsvExport\CsvExport;
$headers = [
'id',
'name',
'age'
];
$rows = [
[1, 'Foo', 12],
[2, 'Bar', 34],
[3, 'John', 12]
];
(new CsvExport())
->setHeaders($headers)
->setRows($rows)
->setFileName('employee.csv')
->download();
// or
(new CsvExport($headers, $rows, 'employee.csv'))->download();
Pull requests are welcome. For any changes, please open an issue first to discuss what you would like to change.
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 file) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Read me |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.