代码片段 gbk_to_utf8
in PHP with 0 comment

代码片段 gbk_to_utf8

in PHP with 0 comment
function gbk_to_utf8($data){
    $result = '';
    if(is_array($data)){
        foreach($data as $key => $val){
            if(is_array($val)){
                $result[$key] = gbk_to_utf8($val);
            }else{
                $result[$key] = iconv("GBK", "UTF-8", $val);
            }
        }
    }else{
        $result = iconv("GBK", "UTF-8", $data);
    }
    return $result;
}
Responses
icon_mrgreen.gificon_neutral.gificon_twisted.gificon_arrow.gificon_eek.gificon_smile.gificon_confused.gificon_cool.gificon_evil.gificon_biggrin.gificon_idea.gificon_redface.gificon_razz.gificon_rolleyes.gificon_wink.gificon_cry.gificon_surprised.gificon_lol.gificon_mad.gificon_sad.gificon_exclaim.gificon_question.gif