stripslashes – PHP String Functions
Syntax :
Description :
It’s an inbuilt function of PHP. stripslashes() function un-quote string quoted with addslashes().
Parameter :
- string – This is a Required parameter. The string to be unescaped.
Output :
Returns the unescaped string. Removes the backslashes from string. (\’ becomes ‘ and so on.) Double backslashes (\\) are made into a single backslash (\).
Note : stripslashes() is not recursive. If you want to apply this function to a multi-dimensional array, you need to use a recursive function.
Related articles : addslashes(), addcslashes().
stripslashes() – PHP Functions Example 1 :
<?php echo stripslashes("Who\'s Charles?"); ?>
Output of above code in the browser is as below: