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\"}]}}}'); 

stripslashes()


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -