keboola / php-csv

CSV reader/writer
MIT License
135 stars 35 forks source link

Adds the ability to specify the newline char to use when writing a CSV file #15

Closed azambon closed 6 years ago

azambon commented 9 years ago

I was using your code to generate CSVs in a project. The customer asked for a CSV with a \r\n newline sequence, so I thought I'd create a pull request in case anyone else is interested. Unit tests for the new feature are included.

The first commit is the one that actually adds the new feature (and tests). The second commit is just a code reformat. Among other things it replaces all of the tab indentations with space indentations, so in the diff it looks like almost everything was rewritten.

odinuv commented 6 years ago

this is now solved in 2.0 version https://github.com/keboola/php-csv#write-csv-with-windows-new-lines