时间:2021-07-01 10:21:17 帮助过:28人阅读
if (!is_array($data)) {
return mb_convert_encoding($data, $output, $encoded);
}
else {
foreach ($data as $key=>$val) {
if(is_array($val)) {
$data[$key] = array_iconv($val, $input, $output);
} else {
$data[$key] = mb_convert_encoding($data, $output, $encoded);
}
}
return $data;
}
}
http://www.bkjia.com/PHPjc/328029.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/328029.htmlTechArticle 代码如下:/** * 对数据进行编码转换 * @param array/string $data 数组 * @param string $output 转换后的编码 */ function array_iconv($data,$output = '...