please how can I print Json with php
I am using below code for English language everything is ok but with another languages
output are unknowns character like ??????? ??????? ???? ?? - ????? - ?????? -??? ?
how can print them like they are in database characters
in phpMyAdmin I am using utf8_bin
and this is my php code
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "clothesapp";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$NumSub = 500;
$start = (int)$_GET['limit'];
$sql = "SELECT * FROM clothesapi LIMIT $start , $NumSub";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$All_storys = array();
while($row = $result->fetch_assoc()) {
$All_storys[] = $row;
}
} else {
echo "0 results";
}
$json_re=array();
array_push($json_re,array("All_storys"=>$All_storys));
echo json_encode($json_re);
$conn->close();
?>
if you have another code can do this please that can help me a lot