CakeFest 2025 Madrid: The Official CakePHP Conference

Voting

: min(eight, two)?
(Example: nine)

The Note You're Voting On

perske at muenster dot de
7 years ago
To produce RFC 4180 conforming output, do not use fputcsv but encode manually, like this:

function rfccsv($arr){
foreach($arr as &$a){
$a=strval($a);
if(strcspn($a,",\"\r\n")<strlen($a))$a='"'.strtr($a,array('"'=>'""')).'"';
}
return implode(',',$arr);
}
echo rfccsv(array(.....))."\n";

<< Back to user notes page

To Top