← All built-ins / mysql_escape()
mysql_escape()
mysql_escape(string $s): string
Parameters
| Name | Type | Description |
|---|---|---|
| $s | string | raw string going into SQL text |
Return value
Escaped string (' " \ NUL) safe for SQL literals.
Example
echo mysql_escape("it's O'Brien");it\\'s O\\'Brien