php strrchr() function
Translation results:
abbr.character characteristics;chrome chromium;chromium chromium;chromate chromate
php strrchr() functionsyntax
Function:Returns the position of the last occurrence of a string in another string, and returns all characters from that position to the end of the string
Syntax: strrchr(string,char)
Parameters:
Parameters | Description |
string | Required. Specifies the string to search for. |
char | Required. Specifies the characters to search for. If the argument is a number, searches for characters matching the ASCII value of this number. |
Description: Find the last occurrence of a string in another string and return all characters from that position to the end of the string .
This function is binary safe.
php strrchr() functionexample
<?php echo strrchr("I'm study in php.cn!","study"); ?>
Run instance»
Click the "Run instance" button to view the online instance
Output:
study in php.cn!
<?php echo strrchr("i like php","like"); ?>
Run Instance»
Click the "Run Instance" button to view the online instance
Output:
like php