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.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions