|
|
Tutorials » Php »
|
Topic |
What is strrchr Function?
|
|
Explanation |
|
In PHP, this function is used to find the last occurrence of a character in a string.
Syntax:
strrchr(string,char)
In the above syntax "string" specifies the strings to be searched, "char" specifies the character to be searched for.
Example:
<?php
echo strrchr("Hello How Are You","o");
?>
Result:
ou
In the above example the character "o" is searched from the position of last occurence, then rest of the string is displayed.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|