I noticed the function json_encode()
automatically puts backslashes on "
and '
values. I was originally protecting against SQL injections by using mysqli_real_escape_string($con, $value)
before the string was put into the array, after then it would be encoded using jSON.
Because json_encode
adds the additional back slashes, it is necessary to use the mysqli_real_escape_string
function?