OOps. No, I guess I screwed up. Sorry.
This may work for you, but seems to be the long way around the mountain...
<?php
function getFile(){
$pos = strpos($_SERVER['PHP_SELF'], '/');
if($pos !== false)
{
$parts = explode('/', $_SERVER['PHP_SELF']);
$count = count($parts);
$variable = substr($parts[$count-1], 0, -4);
}
else {
$variable = substr($parts[$count-1], 0, -4);
}
return $variable;
}
echo getFile();
?>