Hi Jeena,
$parts = explode('.', $filename);
$endung = array_pop($parts);
$name = join('.', $parts);
besser, IMHO, [pathinfo()](http://de.php.net/manual/en/function.pathinfo.php), weil sie alles liefert, was man braucht:
$ php -r 'var\_dump(pathinfo("foo.inc.php"));'
array(4) {
["dirname"]=>
string(1) "."
["basename"]=>
string(11) "foo.inc.php"
["extension"]=>
string(3) "php"
["filename"]=>
string(7) "foo.inc"
}
Gruß,
Andreas.