SyntaxFix
Write A Post
Hire A Developer
Questions
Another way would be to encode the quotes using htmlspecialchars:
$json_array = array( 'title' => 'Example string\'s with "special" characters' ); $json_decode = htmlspecialchars(json_encode($json_array), ENT_QUOTES, 'UTF-8');