The quotemeta() function adds backslashes in front of some predefined characters in a string.
The predefined characters are:
string quotemeta ( string $str )
Returns a version of str with a backslash character (\) before every character that is among these:
Tip: This function can be used to escape characters with special meanings, such as ( ), [ ], and * in SQL.
Parameter | Description |
---|---|
str | Required. Specifies the string to check |
Returns the string with meta characters quoted, or FALSE if an empty string is given as str.