Php entry: strrchr instance tutorial. Php Getting started: strrchr instance tutorial definition and usage the strrchr () function determines that a series of other strings occur, and returns all the characters from this standpoint to end the php Getting started: strrchr instance tutorial
Definition and usage
The strrchr () function determines the position where another string occurs and returns all characters starting from this position to end the string.
If the character cannot be found, this function returns FALSE.
Syntax
Strrchr (string, char)
Parameter Description
String is required. Specify search string
Char is required. The specified string. If this is a number, it will seek to match the ASCII value of the character.
Tip and note: This function is binary secure.
Example 1 Echo strrchr ("Hello world! "," World ");
?>
Output result.
World!
Let's take a look at a strrchr instance.
Example 2
In this example, the ASCII value of the search string is "0 ":
Echo strrchr ("Hello world! ", 111 );
?>
Output result. orld!
Www.111cn.cn/phper/php.html
The definition and usage of the explain instance tutorial this strrchr () function determines that a series of other strings occur and returns all characters starting from this standpoint to end...