Get File Extension

<?php /** * Get the (lowercased) extension from a filename. * @param string $filename The name of the file * @return string * @author Sunny Walker <www.miraclesalad.com> */ function getFileExt($filename) { return strtolower(substr(strrchr($filename, '.'), 1)); } //getFileExt() ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.