Previous | Home | Next |
addcslash()
The addcslashes() function returns a string with backslashes in front of the specified characters.
Syntax :addcslashes(string,characters)
In syntax, "string" Specifies the string to be escaped and "characters" Specifies the characters or range of characters to be escaped.
Example:
<?php $str = addcslashes("Gud Morning...!!","M"); echo($str); ?>
Output:
addslash()
The addslashes() function returns a string with backslashes in front of predefined characters like: Single quotes (' '), Double quotes (" "), Backslash (\) and NULL.
Syntax:addslashes(string)
In syntax, "string" Specifies the string to be escaped.
Example:
<?php $str = addslashes('Who are "you"?'); echo($str); ?>
Output:
Previous | Home | Next |