PHP stripslashes() function

Example

Remove backslashes:

<?php
echo stripslashes("Who\'s Bill Gates?");
?>

Run Example

Definition and Usage

The stripslashes() function removes the backslashes defined by addslashes() 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

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

Technical Details

Return value: Return the string without backslashes.
PHP Version: 4+