Array
(
[0] => Array
(
[ID] => 121175
[TARIH] => Jul 11 2017 03:39:13:473PM
[HASTANEADI] => Ö. ANKARA MEDICANA HST.
[FIELDFORCE] => MELTEM TAŞTAN
[NOTT] =>
[RAKIPFIRMA] => EVET
[FIRMAADI] => CANBEBE ,BEPANTHOL
)
[1] => Array
(
[ID] => 121156
[TARIH] => Jul 11 2017 11:56:35:637AM
[HASTANEADI] => BİLKENT ATATÜRK EĞT.VE ARŞ.HST.
[FIELDFORCE] => MELTEM TAŞTAN
[NOTT] => 65 DOĞUM
[RAKIPFIRMA] => HAYIR
[FIRMAADI] =>
)
[2] => Array
(
[ID] => 121149
[TARIH] => Jul 11 2017 11:40:44:267AM
[HASTANEADI] => Ö. PENDİK HST.
[FIELDFORCE] => YEGANE ALBAYRAK
[NOTT] =>
[RAKIPFIRMA] => EVET
[FIRMAADI] => MOLFİX UNİBABY
)
[3] => Array
(
[ID] => 121130
[TARIH] => Jul 11 2017 10:34:41:240AM
[HASTANEADI] => Ö. REMEDY (ÖZKAN) HST.
[FIELDFORCE] => YEGANE ALBAYRAK
[NOTT] =>
[RAKIPFIRMA] => EVET
[FIRMAADI] => UNİBABY MUSTELA
)
[4] => Array
(
[ID] => 121078
[TARIH] => Jul 10 2017 01:39:11:250PM
[HASTANEADI] => Ö. KORU HST. 12.KAT
[FIELDFORCE] => MELTEM TAŞTAN
[NOTT] => 225 DOĞUM
[RAKIPFIRMA] => HAYIR
[FIRMAADI] =>
)
)
print_r(json_encode($query,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT));
返回NOTHING。但是,如果我重新使用json_encode并仅使用print_r,那么它将返回该数组。我已尝试过其他查询,但实际上看起来很不错。我无法弄清楚伙伴们请帮忙。谢谢!
答案 0 :(得分:0)
我的回忆是,php的json编码对字符集很敏感,特别是强制执行(标准的JSON)字符为UTF-8。 在编码之前,您可能需要将文本重新编码为UTF-8。
有可能在serialize()字符串上执行此操作,然后反序列化,然后进行json编码,这是最快的方法。
答案 1 :(得分:0)
我通过将所有非utf8字符替换为utf8字符来解决这个问题。