I have a problem with my export.
So I tried to export data to .csv with the following code :
$output = fopen('php://output', 'w');
$sFileName = 'test.csv';
header('Content-Disposition: attachement; filename="' . $sFileName . '";');
header("Content-Type:application/csv;charset=UTF-8");
fwrite($output, "sep=;\n");
fputcsv($output, array('Nom', 'Prenom'), ";");
foreach ($aFilterGifts as $value) {
fputcsv($output, $value, ";");
}
fpassthru($output);
fclose($output);
exit;
Where the $aFilterGifts is an array with data. But If I have in Nom, data like this Fossé, when I export I get FossГ©.
Is there a solution? Thank you in advance.