Definition
The addslashes() function returns a string with backslashes before the characters that need to be escaped. These characters are single quote ('), double quote ("), backslash (\) and null
.
Syntax
addslashes(string)
Parameters
Parameter | Description |
---|---|
string |
Required. Specifies the string to be escaped. |
Example
<?php
$str = addslashes("Jobtensor's PHP Tutorials");
echo($str);