Answers for "add slashes to string"

PHP
0

add slashes to string

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

add slashes to string

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

Code answers related to "add slashes to string"

Browse Popular Code Answers by Language