This is a test!

")"; echo json_encode($str); ?> json_encode($response, JSON_UNESCAPED_SLASHES); json_encode($response, JSON_UNESCAPED_SLASHES); $str = preg_replace('/\"/',""", $str); $str = preg_replace('/\\"/',""", $str); $mystring = json_encode($my_json,JSON_UNESCAPED_SLASHES); $str = str_replace('\', '', $str); $mystring = json_encode($my_json,JSON_UNESCAPED_SLASHES); echo json_encode("Hello Worldn"); // results in "Hello Worldn" echo json_encode('Hello Worldn'); // results in "Hello World\n" "$("#output").append(" This is a test!

")" echo json_decode($mystring, JSON_UNESCAPED_SLASHES);