PHP stripslashes() Function
Definition
The stripslashes() function is the opposite of addslashes()
.
It removes one set of \-escapes from a string. For example:
Syntax
PHP stripslashes() Function has the following syntax.
string stripslashes ( string str )
Parameter
str
is the string value to convert.
Return
PHP stripslashes() Function returns string value being stripped with slashes.
Example
Remove the slashes from string
<?PHP//from ww w . j a v a 2 s . co m
$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.