PHP stripslashes() Function

❮ PHP String Reference

Example

Remove the backslash:

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

Definition and Usage

The stripslashes() function removes backslashes added by the addslashes() function.

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


Syntax

stripslashes(string)

Parameter Values

Parameter Description
string Required. Specifies the string to check

Technical Details

Return Value: Returns a string with backslashes stripped off
PHP Version: 4+

❮ PHP String Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.