PHP stripslashes() Function


The stripslashes() function is used to remove backslashes. It returns a string with backslashes stripped off.

Syntax
stripslashes(string)
Parameters
  • string - (required)Specify the string to check.
Example - Strip the string from HTML tags, but allow h1 tags to be used:
<?php
    echo stripslashes("Hii \Hello , \How \Are\ \you!");
?>
 

Output

Hii Hello , How Are you!

Prev Next