diff options
author | ignace nyamagana butera <nyamsprod@gmail.com> | 2014-12-11 08:58:04 +0100 |
---|---|---|
committer | ignace nyamagana butera <nyamsprod@gmail.com> | 2014-12-11 08:58:04 +0100 |
commit | fbe42a2629bb378f4d9841df4bf3de4ca33def53 (patch) | |
tree | 1f887569f4907383db00d4c236148f88ecce10e2 /examples/writing.php | |
parent | 25198fd4036de1b5d46447ae2382fdafd86bade9 (diff) | |
parent | d1edad81b896c6ca68146dc319eed00ccbd6baa0 (diff) | |
download | csv-fbe42a2629bb378f4d9841df4bf3de4ca33def53.zip csv-fbe42a2629bb378f4d9841df4bf3de4ca33def53.tar.gz csv-fbe42a2629bb378f4d9841df4bf3de4ca33def53.tar.bz2 |
Merge pull request #64 from duncan3dc/allow-custom-line-endings
Allow custom line endings
Diffstat (limited to 'examples/writing.php')
-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"]; |