How to get utf-8
in json_encode
php when convert from array to string ?
This is my code for 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);
?>
When test load
example.com/test.php?word=神州
It's show
["\u795e\u5dde","\u795e\u5dde"]
I want to show like this
["神州","神州"]