English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP stripslashes() Function Usage and Example

    PHP String String Function Manual

   The stripslashes() function is used to remove backslashes added by addslashes() Backslashes added by the function.

Syntax

string stripslashes ( string $str )

Definition and Usage

Returns the string with backslashes removed.

Return Value

 Returns a string with escape backslashes removed (\' is converted to ' etc.). Double backslashes (\\) are converted to a single backslash (\).

Parameter

Serial NumberParameters and Description
1

str

Used for string search

Online Example

Try the following example to remove backslashes from the string:

<?php
//Remove backslashes from the string:
$str = "Is your name O'Reilly?";
// Output: Is your name O'Reilly?
echo stripslashes($str);
?>
Test and see‹/›

Output Result

 Is your name O'Reilly?

PHP String String Function Manual