Return to Snippet

Revision: 49984
at August 3, 2011 21:13 by antti


Updated Code
/**
 * Get filename without the extension
 * 
 * @param   string $filename File name
 * @return  string Filename without the extension
 */
function dropExtension($filename) {
    return substr($filename, 0, strrpos($filename, "."));
}

Revision: 49983
at August 3, 2011 21:11 by antti


Initial Code
/**
 * Get filename without the extension
 * 
 * @param   string $filename File name
 * @return  string Filename without the extension
 */
function dropExtension($filename) {
    return substr($filename, 0, strrpos($filename, "."));
}

Initial URL

                                

Initial Description

                                

Initial Title
Get filename without extension

Initial Tags
php, file, textmate, extension

Initial Language
PHP