$value){ //conversion en html $value['LABEL'] = $functions->wash_html($value['LABEL'], "UTF-16LE"); //conversion en UTF-8 $value['LABEL'] = mb_convert_encoding($value['LABEL'], 'UTF-16LE', 'UTF-8'); $value['VALUE'] = $functions->wash_html($value['VALUE'], "UTF-8"); $value['VALUE'] = mb_convert_encoding($value['VALUE'], 'UTF-16LE', 'UTF-8'); fputcsv($fp, $value, ';'); } fclose($fp); $return['status'] = 1; } catch(Exeption $e){ $return['response'] = "ERROR : " . $e; $return['status'] = 0; } } echo json_encode($return); ?>