note 32336 added to function.strrchr

From: Date: Fri, 23 May 2003 21:24:48 +0000
Subject: note 32336 added to function.strrchr
Groups: php.notes 
Request: Send a blank email to php-notes+get-48923@lists.php.net to get a copy of this message
strrchr is also very useful for finding the extension of a file. For example: $ext = strrchr($filename, "."); and $ext will contain the extension of the file, including a ".", if the file has an extension, and FALSE if the file has no extension. If the file has multiple extensions, such as "evilfile.jpg.vbs", then this construction will just return the last extension. ---- Manual Page -- http://www.php.net/manual/en/function.strrchr.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32336 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32336&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32336&report=yes

« previous php.notes (#48923) next »