Filter out special character in json

$str="`!@#$%^&*()_+[]\{}|;':\",./<>?";
$str=str_replace("\\","\\\\", $str);
$str=str_replace("\"","\\\"", $str);

Leave a Reply

Your email address will not be published. Required fields are marked *