how to remove back slashes from json output in php -
the code have used:
$val = json_encode(array("test"=>test1,"test2" =>test,"description" => description)); return $val;
the result im getting
{\"test\":\"test1\",\"test2\":\"test\",\"description\":\"description\"}
i need fix api
try stripslashes()
echo stripslashes('{\"test\":{\"test1\":{\"test1\":[{\"test2\":\"1\",\"test3\": \"foo\",\"test4\":\"bar\",\"test5\":\"test7\"}]}}}');
Comments
Post a Comment