質問

[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??

役に立ちましたか?

解決

As no-one has actually written an answer, read the comments:)

as the others have said, use utf8_encode() then json_encode(). – Brian

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top