Edit report at http://bugs.php.net/bug.php?id=54134&edit=1
ID: 54134 Updated by: [email protected] Reported by: vincent at vincen dot tk Summary: fputcsv $enclosure bug -Status: Open +Status: Bogus Type: Bug Package: *Directory/Filesystem functions Operating System: Windows 7 PHP Version: 5.3SVN-2011-03-02 (snap) Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2011-03-04 10:40:45] carsten_sttgt at gmx dot de > fputcsv($fh, array $line, ";", '"'); > > this short samples provide us three double quotes (or none) > around each elements of the array. $line = 'foobar'; No need to enclose the field, because it doesn't contain reserved characters $line = '"foobar"'; a) If the enclose character (") is used in the field, it have to be doubled ("") --> ""foobar"" b) Contains a reserved character ("), so it have to be enclosed --> """foobar""" See RFC4180. ------------------------------------------------------------------------ [2011-03-02 11:18:06] vincent at vincen dot tk Description: ------------ --- >From manual page: http://www.php.net/function.fputcsv --- fputcsv($fh, array $line, ";", '"'); this short samples provide us three double quotes (or none) around each elements of the array. Expected result: ---------------- i expected one double quotes around each elements. Actual result: -------------- this short samples provide us three double quotes (or none) around each elements of the array. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54134&edit=1
