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