So... why not just do this:
function opentable() {
switch ($site_encoding) {
case "XHTML":
XHTML_header();
break;
case "WML":
default:
WML_header();
break;
}
}
Obviously, do the same thing for your footers.
As far as using variables for function names, you can do this. However, if I'm not mistaken, here is how:
function do_this() {
echo "hello world";
}
// this is the wrong way...
$my_function = "do_this()";
$my_function;
// this is the correct way (I think -- someone correct if I am wrong)...
$my_function = "do_this";
$my_function();