PHP addcslashes() Function

The addcslashed() function in PHP is used to add quote string with slashes in a C style. It is case-sensitive function. 

Syntax

Parameter

str(required)– This parameter represents the string to be escaped.

charlist(required)– This parameter signifies a character or range to be escaped.

Return 

This function returns a string with backslashes in front of the given characters.

Example 1

Output

Example 2

Output

Example 3

Output

Example 4

Output