note 18196 deleted from function.strrchr by sander
| From: | sander@php.net | Date: | Sun, 12 May 2002 15:51:29 +0000 |
| Subject: | note 18196 deleted from function.strrchr by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-30538@lists.php.net to get a copy of this message | ||
If you are looking for the LAST occurence in the string, remember strrev could help you. For example
if you are looking for file extension:
$filename='../../mypass.php';
echo substr($filename,-strpos(strrev($filename),'.'));
It will return 'php'.
/jc