quotemeta

Quote meta characters

Syntax

quotemeta ( string $str ) : string

Parameters

str

The input string.

Return

Returns the string with meta characters quoted, or FALSE if an empty string is given as str.

Examples

<?

$str = "$ ^ * ( ) + [ ] \ . ?";

$return = quotemeta($str);
echo $return;

?>
\$ \^ \* \( \) \+ \[ \] \\ \. \?

PHP

Home Menu