note 18196 added to function.strrchr

From: Date: Mon, 14 Jan 2002 10:20:54 +0000
Subject: note 18196 added to function.strrchr
Groups: php.notes 
Request: Send a blank email to php-notes+get-24792@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 -- http://www.php.net/manual/en/function.strrchr.php http://master.php.net/manage/user-notes.php?action=edit+18196 http://master.php.net/manage/user-notes.php?action=delete+18196 http://master.php.net/manage/user-notes.php?action=reject+18196

« previous php.notes (#24792) next »