PHP stripslashes()Functions

PHP String 参考手册PHP String Reference Manual

Examples

Remove backslashes:

<?php echo stripslashes("Who\'s Peter Griffin?"); ?>

Run Example »

Definition and Usage

The stripslashes() function removes the backslashes added byaddslashes()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 stripped.
PHP Version: 4+


PHP String 参考手册PHP String Reference Manual Other Extensions