- function array_iconv($in_charset,$out_charset,$arr){
- return eval('return '.iconv($in_charset,$out_charset,var_export($arr,true).';'));
- }
-
- echo json_encode(array_iconv('GBK','UTF-8',array("title"=>"Three-day tour from Shanghai to Qingdao","price"=>3000)));
Copy code
|