The stripslashes Function
The stripslashes function removes escaping
of characters done by the addslashes function.
Syntax
stripslashes(string $string): string
Example
Let's use our function to remove the escaping of quotes:
<?php
echo stripslashes('id=\"eee\"');
?>
Code execution result:
'id="eee"'
See Also
-
the
addslashesfunction,
which performs the reverse operation -
the
str_replacefunction,
which also performs search and replace -
the
substr_replacefunction,
which cuts out part of a string and replaces it with another