php_公共方法01_传入数组_打印可见信息
function decodeUnicode($str) { return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', 'convert', $str); } function convert($matches){ return mb_convert_encoding(pack("H*", $matches[1]), "UTF-8", "UCS-2BE"); } demo: $test=array('一个'=>array('中文'=>'中文')); var_dump(decodeUnicode(json_encode($test)));
create by cphmvp
email:cphmvp@163.com
爬虫技术交流_crawler QQ群 :167047843