Home >Backend Development >PHP Tutorial >PHP addcslashes() function_PHP tutorial
Definition and Usage
The addcslashes() function adds a backslash before the specified character.
Syntax addcslashes(string,characters)
string required. Specifies the string to check.
characters optional. Specifies the characters or range of characters affected by addcslashes().
Tips and Notes
Note: Be careful when applying addcslashes() to 0, r, n and t. In PHP,,,
and are predefined escape sequences.
Example
$val = addcslashes($val, );
?>