PHP - quotemeta 函式



語法

string quotemeta ( string $str )

定義和用法

用於引用元字元

返回值

成功時返回帶有元字元的字串,失敗時返回 false

引數

序號 引數及描述
1

字串

字串輸入

示例

嘗試以下示例

<?php
   $input = "Tutorials point. (simply easy learning)";
   
   echo quotemeta($input);
?>

這將產生以下結果:

Tutorials point\. \(simply easy learning\)
php_function_reference.htm
廣告