Home > Backend Development > PHP Tutorial > PHP gbk环境下json_dencode传送来的汉字_php技巧

PHP gbk环境下json_dencode传送来的汉字_php技巧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-17 09:08:05
Original
1109 people have browsed it
复制代码 代码如下:

function ArrEncode($arr){
foreach($arr as $k=>$v){
if(is_array($v)){
$arr[$k] =ArrEncode($v);
}else{
$arr[$k] = urlencode($v);
}
}
return $arr;
}
在控制器方法里面可以。
$arr = ArrEncode($uns);
echo urldecode(json_encode($arr));
Related labels:
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