note 54042 added to function.ltrim
| From: | publicmarcyescom at osu1 dot php dot net | Date: | Tue, 21 Jun 2005 21:31:47 +0000 |
| Subject: | note 54042 added to function.ltrim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90766@lists.php.net to get a copy of this message | ||
totally messed up the last post, here is a function that will be able to take filenames like
h.a.p.p.p.y.jpg without problems:
//get the extension of the file
function getFileExtension($file){
//get the type of the file:
while(($file_ext = stristr($file,".")) !== false){
$file_ext = substr($file_ext,1);
$file = $file_ext;
}//while
return trim($file);
}//getFileExtension()
----
Manual Page -- http://www.php.net/manual/en/function.ltrim.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54042
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54042&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54042&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54042&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54042&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54042&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54042&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54042&report=yes
Search -- http://master.php.net/manage/user-notes.php