diff options
author | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2014-02-07 10:58:13 +0100 |
---|---|---|
committer | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2014-02-07 10:58:13 +0100 |
commit | 55d02f8f0f987ca5904d34bc56d022e020595d66 (patch) | |
tree | ccd2038b5d407bb9084e1cf22bd21392accbe3ff /examples/example05.php | |
parent | bfb61f0f466bba7df3fbc09208a4f40c3460276b (diff) | |
download | csv-55d02f8f0f987ca5904d34bc56d022e020595d66.zip csv-55d02f8f0f987ca5904d34bc56d022e020595d66.tar.gz csv-55d02f8f0f987ca5904d34bc56d022e020595d66.tar.bz2 |
examples update
Diffstat (limited to 'examples/example05.php')
-rw-r--r-- | examples/example05.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/example05.php b/examples/example05.php index 74cbffc..33210d3 100644 --- a/examples/example05.php +++ b/examples/example05.php @@ -1,10 +1,7 @@ <?php -error_reporting(-1); -ini_set('display_errors', 'On'); - -use Bakame\Csv\Reader; use Bakame\Csv\Writer; +use Bakame\Csv\Reader; require '../vendor/autoload.php'; @@ -35,6 +32,7 @@ $res = $inputCsv $headers = $inputCsv->fetchOne(0); $writer = new Writer(new SplTempFileObject); //because we don't want to create the file +$writer->setDelimiter("\t"); //the delimiter will be the tab character $writer->insertOne($headers); $writer->insertAll($res); ?> @@ -52,7 +50,6 @@ $writer->insertAll($res); <pre> <?=$writer?> </pre> -<p><em>Notice that the delimiter have changed from <code>;</code> to <code>,</code></em></p> -</ol> +<p><em>Notice that the delimiter have changed from <code>;</code> to <code><tab></code></em></p> </body> </html> |