Hi,

I'm trying to work out how to change the file included on a php page with respect to the page url.

The idea is this

sport/home.php should include sport/home.htm
sport/away.php should include sport/away.htm

etc etc

can I use $PHP_SELF to do this?

would this work:

$includefile = str_replace(".php", ".htm", basename($PHP_SELF));
include("sport/ . $includefile");