I have a php file to return json but the result given not correctly.
Ex: Lập Trình Ứng Dụng in database => L?p Trình ?ng D?ng in view
Here it's php file
<?php
$mysql = new mysqli('localhost','root','','freelancer');
$result = $mysql->query("select * from tag");
$rows = array();
while($row = $result->fetch_array(MYSQL_ASSOC)) {
$rows[] = array_map("utf8_encode", $row);
}
echo json_encode($rows);
?>
Hope everyone can help me with this.Thanks for read