$file  = basename($_SERVER[’PHP_SELF’]);

Will return the file name with extension;

There is a way to get the file name without extension too:

http://ca3.php.net/manual/en/function.basename.php