PHP strrchr() FunctionThe strrchr() function in inbuilt function of PHP. It is used to find the position of the last occurrence of a string. This function returns all characters from this position to the end of the string or FALSE if the character is not found. Note: The strrchr() function is binary-safe.Syntax:
Example 1Output: Your first string is:Hello PHP Your second string is:PHP By using 'strrchr()' function:P Example 2Output: Your string is:We are Learning PHP By using 'strrchr()' function:arning PH Example 3Output: Your string is:Hello PHP By using 'strrchr()' function:ello PHP See Also:strncmp() : String comparison of the first n characters (case-sensitive) strpbrk() : Searches a string for any of a set of characters strpos() :Returns the position of the first occurrence of a string inside another string (case-sensitive) Refererence: http://php.net/manual/en/function.strrchr.phpNext TopicPHP String |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India