PHP function addcslashes()
Availability in PHP 4.0
Quote string with slashes in a C style
Parameters
| Parameter | Data type | Default value | Note |
|---|---|---|---|
$str |
string |
not | String to be escaped. |
$charlist |
string |
not | List of characters to be escaped. If charlist contains \n, \r, etc., they are converted to C style, while other non-alphanumeric characters with ASCII codes lower than 32 and higher than 126 are converted to octal representation. |
Return values
string
the escaped string.