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
Popular Articles