@ 2018-04-25T14:33:10Z <?php
$intColumnValue = 5;
$stringColumnValue = "asds";
$stringColumnValueWithQuotes = "asds \"test\" sdfg";
$jsonValue = [
'number' => 7.8,
'string' => 'aqsdsdw',
'bool' => true,
'stringWithQuotes' => 'test1 "test2" test3',
];
$jsonColumnValue = json_encode($jsonValue);
$csvRow = [$intColumnValue, $stringColumnValue, $stringColumnValueWithQuotes, $jsonColumnValue];
fputcsv(STDOUT, $csvRow);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.4.1 - 8.4.3 Deprecated: fputcsv(): the $escape parameter must be provided as its default value will change in /in/i4upp on line 16
5,asds,"asds ""test"" sdfg","{""number"":7.8,""string"":""aqsdsdw"",""bool"":true,""stringWithQuotes"":""test1 \"test2\" test3""}"
Output for 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.31 , 8.2.0 - 8.2.27 , 8.3.0 - 8.3.16 5,asds,"asds ""test"" sdfg","{""number"":7.8,""string"":""aqsdsdw"",""bool"":true,""stringWithQuotes"":""test1 \"test2\" test3""}"
preferences:dark mode live preview ace vim emacs key bindings
138.76 ms | 409 KiB | 5 Q