I have special HTML entities in my text stored in mysql. When I try to read that data returned from mysql into PHP using json_encode, it fails silently. When I use json_encode(array_map('utf8_encode', $row));
it give output as
["{\"autoid\":\"2\",\"package_id\":\"a78o5jax32\",\"chapter_title\":\"General Aspects of Surgery\",\"question_text\":\"Capsule Endoscopy-False statement is\",\"explanation\":\"
Capsule\\u00dd Endoscopy is not suitable for patients with strictures.<\\\/p>\",\"reference\":\"Bailey and Love 26th Edition P\\\/205\",\"options\":\"Sedation Not RequiredxxxxxxPainless ProcedurexxxxxxVisualize Entire small BowelxxxxxxSuitable For Patients With Stricture Bowel\",\"answer\":\"3\"}","{\"autoid\":\"3\",\"package_id\":\"a78o5jax33\",\"chapter_title\":\"General Aspects of Surgery\",\"question_text\":\"Physiological changes in laparoscopy include all excep\",\"explanation\":\"• Laparoscopy\\u00de causes increased PCWP, Intra cranial Pressure and decreased Functional Residual capacity after expiration is decreased after laparoscopy gas insuffulation.
• There will be Hypercarbia and acidosis (pH decrease)
\",\"reference\":\"Ref: Schwartz Page 417\\\/ 10th Edition\",\"options\":\"Increases PCWPxxxxxxIncreased ICPxxxxxxDecreased FRCxxxxxxIncreased pH\",\"answer\":\"4\"}"]
which cant be parsed as json.
Please help how can I get special entities sored in mysql text and create json. I will later use that json in jquery ajax.
Special entities are like Ý