note 86377 added to function.fputcsv
| From: | m at rcwehbi dot com | Date: | Wed, 15 Oct 2008 17:33:44 +0000 |
| Subject: | note 86377 added to function.fputcsv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145386@lists.php.net to get a copy of this message | ||
Please note the guy right below me made a bad mistake in his code:
The 10th line from the bottom:
if( $i++ != $field_cnt ) {
should be:
if( ++$i != $field_cnt ) {
or else it will add an extra comma at the end of every line making your csv file useless!
----
Server IP: 212.124.37.9
Probable Submitter: 82.210.249.81
----
Manual Page -- http://www.php.net/manual/en/function.fputcsv.php
Edit -- https://master.php.net/note/edit/86377
Del: integrated -- https://master.php.net/note/delete/86377/integrated
Del: useless -- https://master.php.net/note/delete/86377/useless
Del: bad code -- https://master.php.net/note/delete/86377/bad+code
Del: spam -- https://master.php.net/note/delete/86377/spam
Del: non-english -- https://master.php.net/note/delete/86377/non-english
Del: in docs -- https://master.php.net/note/delete/86377/in+docs
Del: other reasons-- https://master.php.net/note/delete/86377
Reject -- https://master.php.net/note/reject/86377
Search -- https://master.php.net/manage/user-notes.php