Html entities like € is not converted to its symbol in CSV conversion

前端 未结 6 540
别跟我提以往
别跟我提以往 2021-01-19 16:13

I have used CSV parser from http://code.google.com/p/parsecsv-for-php/, to export my reports to CSV in PHP. I have displayed Sales Total value in €XXXX.XX

6条回答
  •  一整个雨季
    2021-01-19 16:24

    Try this

    //add BOM to fix UTF-8 in Excel
    fputs($fp, $bom =( chr(0xEF) . chr(0xBB) . chr(0xBF) ));
    fputcsv($handler, $fields, ';', '"');
    

提交回复
热议问题