0
我使用jQuery在PHP中运行函数以从数据库获取数据。ñ返回null - jQuery en PHP
$.ajax({
url: 'service.php',
data: { functie: type, param: radiobutton },
dataType: 'json',
success: function (data) {}
});
一切正常。除了具有特殊字符的字符串在succes函数中返回为null。例如:正
这个答案就在这里解释: Special characters break json returned to jQuery
但它不为我工作。
在PHP我想:
$result = mysql_query("SELECT * FROM wines");
$array = array();
while($row = mysql_fetch_assoc($result)){
$array[]=htmlentities($row);
}
谁知道如何确保一切回报的好方法?
阅读:[处理Unicode的前向后在一个Web应用程序](http://kunststube.net/frontback/) – deceze 2012-08-14 12:15:48