Remove extension from a filename

Description PHP

Removes the extension (and dot) of a filename

The Code Download

  1. <?php
  2. function RemoveExtension($filename) {
  3.     $file = substr($filename, 0,strrpos($filename,'.'));   
  4.     return $file;
  5. }
  6. ?>

Credits

Added by JC on 12th November 2007

Comments

There are no comments about this snippet.

Post Comment Github Markdown Supported

You must be logged in to post a comment.

Login here to post a comment