Current Location: Home> Function Categories> quotemeta

quotemeta

Escape metacharacter set
Name:quotemeta
Category:String
Programming Language:php
One-line Description:Quoting metacharacters.

Definition and usage

quotemeta() function adds a backslash before some predefined characters in the string.

Predefined characters:

  • period(.)
  • Backslash (\)
  • Plus sign (+)
  • Asterisk (*)
  • question mark(?)
  • Square brackets ([])
  • Off-font size (^)
  • Dollar Sign ($)
  • Braces (())

Tip: This function can be used to escape characters with special meanings, such as ( ), [ ] and * in SQL.

Note: This function is binary safe.

grammar

 quotemeta ( string )
parameter describe
string Required. Specifies the string to be checked.
Similar Functions
  • The case-insensitive version of str_replace str_ireplace

    str_ireplace

    Thecase-insensitivev
  • Convert hexadecimal string to binary string hex2bin

    hex2bin

    Converthexadecimalst
  • String comparison using the "natural order" algorithm strnatcmp

    strnatcmp

    Stringcomparisonusin
  • Binary safe string comparison strcmp

    strcmp

    Binarysafestringcomp
  • Set the first character of the string to uppercase ucfirst

    ucfirst

    Setthefirstcharacter
  • Remove spaces (or other characters) from the beginning and end of the string trim

    trim

    Removespaces(orother
  • Comparison of strings based on locale settings strcoll

    strcoll

    Comparisonofstringsb
  • Calculate the metaphone key of a string metaphone

    metaphone

    Calculatethemetaphon
Popular Articles