|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-04-28 00:57 UTC] mike dot reinstein at freecause dot com
[2011-05-31 13:40 UTC] iliaa@php.net
-Status: Open
+Status: Bogus
[2011-05-31 13:40 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 20:00:01 2025 UTC |
Description: ------------ str_getcsv will enclose strings differently depending on the contents of the input string. See the test script below for replication. Test script: --------------- $input = "hey, and\"let's\" see how, this works"; $result = str_getcsv($input, ',', '"', '"'); print_r($result); $input2 = "hey, \"let's\" see how, this works"; $result2 = str_getcsv($input, ',', '"', '"'); print_r($result2); Expected result: ---------------- Here's the output: Array ( [0] => hey [1] => and"let's" see how [2] => this works ) Array ( [0] => hey [1] => let's see how [2] => this works ) Actual result: -------------- Array ( [0] => hey [1] => and"let's" see how [2] => this works ) Array ( [0] => hey [1] => "let's" see how [2] => this works )