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
  • Calculate the last occurrence of the specified string in the target string (case insensitive) strripos

    strripos

    Calculatethelastoccu
  • Alias ​​of rtrim chop

    chop

    Alias​​ofrtrim
  • Output a string print

    print

    Outputastring
  • Get the length of the starting substring that does not match the mask strcspn

    strcspn

    Getthelengthofthesta
  • Find the last occurrence of a specified character in a string strrchr

    strrchr

    Findthelastoccurrenc
  • Convert logical-Hebrew to visual-Hebrew hebrev

    hebrev

    Convertlogical-Hebre
  • Binary safe comparison of several characters at the beginning of a string strncmp

    strncmp

    Binarysafecomparison
  • Convert the first byte of the string to a value between 0-255 ord

    ord

    Convertthefirstbyteo
Popular Articles