function EndsWith($FullStr, $EndStr)
{
// Get the length of the end string
$StrLen = strlen($EndStr);
// Look at the end of FullStr for the substring the size of EndStr
$FullStrEnd = substr($FullStr, strlen($FullStr) - $StrLen);
// If it matches, it does end with EndStr
return $FullStrEnd == $EndStr;
}
Nessun commento:
Posta un commento