The stripslashes() function is the opposite of addslashes()
.
It removes one set of \-escapes from a string. For example:
PHP stripslashes() Function has the following syntax.
string stripslashes ( string str )
str
is the string value to convert.
PHP stripslashes() Function returns string value being stripped with slashes.
Remove the slashes from string
<?PHP
$string = "this is a 'test' from java2s.com";
$a = addslashes($string);
print $a;
print "\n";
$b = stripslashes($a);
print $b;
?>
The code above generates the following result.