mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Merge pull request #78 from lbajsarowicz/patch-1
Documentation: added example usage of fields variable
This commit is contained in:
@@ -79,6 +79,14 @@ $csv->data[4] = array('firstname' => 'John', 'lastname' => 'Doe', 'email' => 'jo
|
|||||||
$csv->save();
|
$csv->save();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Replace field names or set ones if missing**
|
||||||
|
|
||||||
|
```php
|
||||||
|
$csv = new parseCSV();
|
||||||
|
$csv->fields = ['id', 'name', 'category']
|
||||||
|
$csv->parse('data.csv');
|
||||||
|
```
|
||||||
|
|
||||||
**Add row/entry to end of CSV file**
|
**Add row/entry to end of CSV file**
|
||||||
|
|
||||||
_Only recommended when you know the extact structure of the file._
|
_Only recommended when you know the extact structure of the file._
|
||||||
|
|||||||
Reference in New Issue
Block a user