Skip to content

Commit

Permalink
Readme: updated
Browse files Browse the repository at this point in the history
  • Loading branch information
janpecha committed Jun 22, 2018
1 parent c9d3a57 commit a1b3fae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ id,name
```php
$iterator = new CzProject\CsvIterator\CsvIterator('/path/to/file.csv');

// optional:
$iterator->setDelimiter(',');
$iterator->setEnclosure('"');
$iterator->setEscape('\\');
$iterator->setEncoding('UTF-8');

while (($row = $iterator->fetch()) !== NULL) {
echo $row['id']; // prints '1'
echo $row['name']; // prints 'Gandalf The White'
Expand Down

0 comments on commit a1b3fae

Please sign in to comment.