@ 2017-10-23T13:47:35Z

<?php /* * The value of the $escape parameter doesn't matter * unless it's set to the one character that makes sense * then it f's up the escaping and produces invalid CSV data * */ $fh = fopen('php://stdout', 'w'); fputcsv($fh, ['using default', 'a,"b'], ',', '"'); fputcsv($fh, ['using " ', 'a,"b'], ',', '"', '"'); fputcsv($fh, ['using x ', 'a,"b'], ',', '"', 'x'); fputcsv($fh, ['using \\ ', 'a,"b'], ',', '"', '\\');