My php code is below :
<?php
$HostName = "localhost";
$HostUser = "root";
$HostPass = "pass";
$DatabaseName = "test";
$conn = new mysqli($HostName, $HostUser, $HostPass, $DatabaseName);
$conn->set_charset("utf8");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM demo";
$result = $conn->query($sql);
if ($result->num_rows >0) {
while($row[] = $result->fetch_assoc()) {
$tem = $row;
$json = json_encode($tem);
}
} else {
echo "No Results Found.";
}
echo $json;
$conn->close();
?>
I expect the output of like this :
[{"id":"1","name":"ami","phone":"এক"},{"id":"2","name":"tmi","phone":"দুই"}]
but the actual output is
[{"id":"1","name":"ami","phone":"\u0987\u0982\u09b2\u09cd\u09af\u09be\u09a8\u09cd\u09a1"},{"id":"2","name":"tmi","phone":"\u0987\u0982\u09b2\u09cd\u09af\u09be\u09a8\u09cd\u09a1"}]