September 2001
Intermediate to advanced
768 pages
32h 45m
English
string strrchr(string string, string character)
Returns all characters after the last occurrence of character within string, including character.
Returns:
String; FALSE if needle is not found in haystack
Description:
strrchr() finds the position of the last occurrence of character within string and returns all characters from this position to the end of the string. If character cannot be found, FALSE is returned.
Version:
PHP 3+, PHP 4+
See also:
Other functions that find characters within strings:
substr() stristr() strpos() strrpos() strstr()
Example:
<?php $string = "It's 4am, do you know where your brain is?"; $chr = 'o'; $result = strrchr ($string, $chr); if (FALSE ... |
Read now
Unlock full access