PHP stripslashes() Function

Example

Remove Backslashes:

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

Running Instance

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: Returns the string with backslashes removed.
PHP Version: 4+