PHP stripcslashes() Function

Example

Remove the backslash before "World!":

<?php
echo stripslashes("Hello \World!");
?>

Run Example

Definition and Usage

stripcslashes() function removes the backslashes defined by addcslashes() Backslashes added by the function.

Tip:This function can be used to clean up data retrieved from a database or from an HTML form.

Syntax

stripcslashes(string)
Parameter Description
string Required. Specifies the string to be checked.

Technical Details

Return Value: Return the non-escaped string.
PHP Version: 4+