stripcslashes

string stripcslashes(string string) 

Converts C-style escape sequences to their literal values and strips leading backslashes.

Returns:

String

Description:

stripcslashes() converts C-style escape sequences (\, \a, \b, \f, \n, \r, \t, \v, and \x hh hex and \ ooo octal character escape sequences) to their literal equivalents. Additionally, it strips the backslash from escape sequences that it doesn’t recognize.

Version:

PHP 4.0b4+

See also:

To remove backslashes without performing conversions:

stripslashes() 

To add escape sequences to a string:

addslashes() 
addcslashes() 

Example:

Convert C-style escape sequences to their literal equivalents
 <?php $quote = '"The only processes that we can rely on indefinitely are cyclical;\n' ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.