<?php
//set charset:utf-8 //for json, is it right way to do it;
header('Content-Type:application/json; charset:utf8');
$mysqli = new mysqli('localhost','root','','hospital');
$myArray = array();
if ($result = $mysqli->query("SELECT * FROM tips")) {
while($row = $result->fetch_array(MYSQL_ASSOC)) {
$myArray[] = $row;
}
echo json_encode($myArray);
}
$result->close();
$mysqli->close();
?>
答案 0 :(得分:1)
您应该将字段的排序规则设置为&#34; utf8_bin&#34;这样mysql就可以正确地将数据存储在古吉拉特语中。而且你还需要一个合适的古吉拉特语字符来应用css class font-family propery