mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Example usage of field variable
This commit is contained in:
@@ -79,6 +79,14 @@ $csv->data[4] = array('firstname' => 'John', 'lastname' => 'Doe', 'email' => 'jo
|
||||
$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**
|
||||
|
||||
_Only recommended when you know the extact structure of the file._
|
||||
|
||||
Reference in New Issue
Block a user