Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 602 Bytes

README.md

File metadata and controls

33 lines (25 loc) · 602 Bytes

Export array data to csv file

Installation

The preferred way to install this extension is through composer.

php composer.phar require serrg1994/yii2-csv-export "@dev"

or add

"serrg1994/yii2-csv-export": "@dev"

to the require section of your composer.json.

Usage

CSVExport::Export([
    'dirName' => Yii::getAlias('@webroot'),
    'fileName' => 'users.csv',
    'data' => [
        ['#', 'User Name', 'Email'],
        ['1', 'Serhiy Novoseletskiy', '[email protected]']
    ]
]);