【发布时间】:2019-09-02 20:22:29
【问题描述】:
我想显示数据库中的名称,但名称包含“Ñ”,结果为“Null”
我正在使用此代码
$result = array();
$sth = $dbcon->prepare("MY SELECT CODE HERE");
$sth->execute();
while($row_count = $sth->fetch(PDO::FETCH_ASSOC)){
$result[] = $row_count;
}
echo json_encode($result);
这里是结果..你可以看到名称中的空值,因为这个字符串有“Ñ”,而表中有Ñ
[{"emp_id":"12561-2013","name":null,"
【问题讨论】:
-
stackoverflow.com/questions/12911536/… 试试上面的解决方案可能行得通
标签: javascript php pdo