从数组转换为字符串时如何进入utf-8
php ?json_encode
这是我的代码test.php
:
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?PHP
session_start();
include("connect.php");
$word = mysqli_real_escape_string($db_mysqli,$_GET['word']);
$xx = array();
$xx[] = $word;
$xx[] = $word;
$xx_1 = json_encode($xx);
print_r($xx_1);
?>
当测试负载
example.com/test.php?word=神州
是秀
["\u795e\u5dde","\u795e\u5dde"]
我想这样展示
["神州","神州"]