summaryrefslogtreecommitdiffstats
path: root/examples/writing.php
diff options
context:
space:
mode:
authorignace nyamagana butera <nyamsprod@gmail.com>2014-12-11 08:58:04 +0100
committerignace nyamagana butera <nyamsprod@gmail.com>2014-12-11 08:58:04 +0100
commitfbe42a2629bb378f4d9841df4bf3de4ca33def53 (patch)
tree1f887569f4907383db00d4c236148f88ecce10e2 /examples/writing.php
parent25198fd4036de1b5d46447ae2382fdafd86bade9 (diff)
parentd1edad81b896c6ca68146dc319eed00ccbd6baa0 (diff)
downloadcsv-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-xexamples/writing.php1
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"];