diff options
author | Craig Duncan <git@duncanc.co.uk> | 2014-12-09 16:05:28 +0000 |
---|---|---|
committer | Craig Duncan <git@duncanc.co.uk> | 2014-12-09 16:32:24 +0000 |
commit | d1edad81b896c6ca68146dc319eed00ccbd6baa0 (patch) | |
tree | 1f887569f4907383db00d4c236148f88ecce10e2 | |
parent | 1504d2d938fa517d3ada657723d30306cb4cef2d (diff) | |
download | csv-d1edad81b896c6ca68146dc319eed00ccbd6baa0.zip csv-d1edad81b896c6ca68146dc319eed00ccbd6baa0.tar.gz csv-d1edad81b896c6ca68146dc319eed00ccbd6baa0.tar.bz2 |
Updated the writing example to include a line ending setter
-rwxr-xr-x | examples/writing.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/writing.php b/examples/writing.php index 53b6ec7..557e74a 100755 --- a/examples/writing.php +++ b/examples/writing.php @@ -9,6 +9,7 @@ require '../vendor/autoload.php'; $writer = Writer::createFromFileObject(new SplTempFileObject()); //the CSV file will be created into a temporary File $writer->setDelimiter("\t"); //the delimiter will be the tab character +$writer->setLineEnding("\r\n"); //use windows line endings for compatibility with some csv libraries $writer->setEncodingFrom("utf-8"); $headers = ["position" , "team", "played", "goals difference", "points"]; |