Home >>PHP String Functions >PHP stripcslashes() Function
PHP stripcslashes() function is used to remove backslashes and clean up the data retrieved from any database or from an HTML form. It returns a string as output with all the backslashes stripped off from the given input string. It removes the backslashes added by the addcslashes() function.
Syntax
stripcslashes($string);
Parameter | Description |
---|---|
string | This is a required parameter. This parameter defines the string to check. |
Here is an example of stripcslashes() function in PHP:
<html> <body> <?php echo stripcslashes("Hello \Everyone.."); ?> </body> </html>
Here is an another example of stripcslashes() function in PHP:
<html> <body> <?php $str = "Hello Everyone.. \Welcome to PHPTPOINT"; echo $str; echo "<br>"; echo stripcslashes($str); ?> </body> </html>