- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
strrchr() function in PHP
The strrchr() function is used to find the last occurrence of a character in a string.
Syntax
strrchr(str, char)
Parameters
str − The string to search
char − The character to find in the string. If char contains more than one character, then only the first is used.
Return
The strrchr() function returns all characters from the last occurrence of a string within another string, to the end of the main string. It returns FALSE if the character is not found.
Example
The following is an example −
<?php echo strrchr("Welcome to the web","web"); ?>
Output
web
Advertisements
To Continue Learning Please Login
Login with Google