PHP Tutorial - PHP stripcslashes() Function






Definition

The stripcslashes() function removes backslashes added by the addcslashes() function.

Syntax

PHP stripcslashes() Function has the following syntax.

stripcslashes(string)

Parameter

ParameterIs Required Description
stringRequired. String to check

Return

PHP stripcslashes() Function returns the unescaped string.

Note

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





Example

Remove the backslash in front of "World!":


<?php
echo stripslashes("Hello \World!");
?>

The code above generates the following result.