<?php
function GetExt ($sString, $lCase = true)
if (!strpos ($sString, '.') || !is_string ($sString)) {
return false;
}
$aFragments = explode ('.', $sString);
if (true === $lCase) {
return strtolower (array_pop ($aFragments));
} else {
return array_pop ($aFragments);
}
?>