September 2001
Intermediate to advanced
768 pages
32h 45m
English
string stripslashes(string string) Strips backslashes from a string.
Returns:
String
Description:
stripslashes() removes the backslashes from any escape sequence that it encounters in a string. An escape sequence starts with a backslash and is followed by one or more characters.
This function is often used to strip backslashes from data retrieved from a database or to clean up data submitted by an HTML form.
Version:
PHP 3+, PHP 4+
See also:
To remove backslashes and convert C-style escape sequences to their literal values:
stripcslashes()
To add slashes to a string:
addslashes()
Example:
// database connection code omitted for brevity $author = 'Sam Clemens'; // query a ... |
Read now
Unlock full access