The stripcslashes() function removes backslashes added by the addcslashes() function.
PHP stripcslashes() Function has the following syntax.
stripcslashes(string)
Parameter | Is Required | Description |
---|---|---|
string | Required. | String to check |
PHP stripcslashes() Function returns the unescaped string.
This function can be used to clean up data retrieved from a database or from an HTML form.
Remove the backslash in front of "World!":
<?php
echo stripslashes("Hello \World!");
?>
The code above generates the following result.