|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-03-02 11:18 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 20:00:01 2025 UTC |
> 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.