JSON encode not working with special characters
Hi ,
But when i use special characters like &,*,[,+ ,'etc, my stuff from Handson table is not encoded properly and the text going in Mysql DB is not properly JSON encoded and is broken.
So when i display this data on Webpage , it is not displayed at all as it is based on JSON format .
What should i do so that the JSON format don't get break.
I am using this to JSON encode:
<?php include("/home/gpreeti/php/JSON.php"); $json = new Services_JSON(); $marks = array( "mohammad" => array ( "physics" => 35, "maths" => 30, "chemistry" => 39 ), "qadir" => array ( "physics" => 30, "maths" => 32, "chemistry" => 29 ), "zara" => array ( "physics" => 31, "maths" => 22, "chemistry" => 39 ) ); $marks=$json->encode($marks);