Excel csv export into a php file with fgetcsv

前端 未结 5 1609
粉色の甜心
粉色の甜心 2021-01-13 17:32

I\'m using excel 2010 professional plus to create an excel file. Later on I\'m trying to export it as a UTF-8 .csv file. I do this by saving it as CSV (symbol separated....

5条回答
  •  生来不讨喜
    2021-01-13 18:11

    And for the people from Czech republic:

    function convert( $str ) {
        return iconv( "CP1250", "UTF-8", $str );
    }
    ...
    while (($data = fgetcsv($this->fhandle, 1000, ";")) !== FALSE) {
    $data = array_map( "convert", $data );
    ...
    

提交回复
热议问题