PHP: avoid backslash on json_encode

Hey! 🙂 If you are encoding your Arrays to JSON in PHP using json_encode() and the function adds backslash before your slashes, I’m gonna show you a quick fix. This is my original code:

And the result is: {“success”:true,”message”:”Please enter email\/phone number.”} See the added backslash before the slash? Ugly, right? To avoid that, […]

Read More