PHP - strchr 函式



語法

strchr(string,search,before_search);

定義和用法

用於搜尋另一個字串中第一次出現的字串。

返回值

返回字串的其餘部分。

引數

序號 引數和說明
1

字串

要搜尋的字串。

2

搜尋

要搜尋的字串。

示例

嘗試以下示例

<?php
   echo strchr("Hello world!","world");
?>

這將產生以下結果:

world!
php_function_reference.htm
廣告