Posted By

antti on 08/03/11


Tagged

php file textmate filename extension util


Versions (?)

Get filename without extension


 / Published in: PHP
 

  1. /**
  2.  * Get filename without the extension
  3.  *
  4.  * @param string $filename File name
  5.  * @return string Filename without the extension
  6.  */
  7. function dropExtension($filename) {
  8. return substr($filename, 0, strrpos($filename, "."));
  9. }

Report this snippet  

You need to login to post a comment.