array (
0 => '"大连周水子机场"→人民路',
1 => '
运营时间::~: 票价:元 发车间隔分钟一班,客满随时发车',
)
*/
function
replaceUni(
$str
) {
return
preg_replace("#\\\u([0-9a-f]+)#ie", "iconv('UCS-2', 'UTF-8', pack('H4', '\\1'))",
$str
);
}
$test1_2
= replaceUni(json_encode(
$test
));
$test2_2
= json_decode(
$test1_2
, TRUE);
echo
$test1_2
;
echo
PHP_EOL;
var_export(
$test2_2
);
echo
PHP_EOL;