Home > Backend Development > PHP Tutorial > 问各位老大一个简单的有关问题, 怎么转换数组的字符集

问各位老大一个简单的有关问题, 怎么转换数组的字符集

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:39:42
Original
865 people have browsed it

问各位老大一个简单的问题, 如何转换数组的字符集?
对于字符串, 有mb_convert_encoding()函数. 

可是对于一个数组呢? 难道要循环着用这个函数吗:

array_map(
        function($value) use($from, $to) {return mb_convert_encoding($value, $from, $to);}, 
        $input
    );


这样会产生效率问题, 如果一个大数据, 就弱爆了. 
能不能一次处理,有这样的内置函数吗?或者其他的解决方案?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template