问题
[7671] => Sleaford Carre’s
is an element in $result
$result= json_encode($result);
echo $result;
//outputs
"7671":null,
Please note that this is not a normal apostrophe (single quote) or a back tick. I cant even find it on my keyboard. Data comes from a Latin-1 table.
I have also noticed that using htmlentities on building the array will dissapear the string from the array. What am I to do??
回答1:
As no-one has actually written an answer, read the comments:)
as the others have said, use utf8_encode() then json_encode(). – Brian
来源:https://stackoverflow.com/questions/19688409/special-apostrophe-breaks-json