Answers for "add slashes to string"

0

add slashes to string

<?php
$str = "O'Reilly?";
eval("echo '" . addslashes($str) . "';");
?>
Posted by: Guest on February-18-2021
0

add slashes to string

str = str.replace(/'/g, "\\'");
Posted by: Guest on February-18-2021

Code answers related to "add slashes to string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language