I\'m wondering if there is a way to call variable functions with namespaces. Basically I\'m trying to parse tags and send them to template functions so they can render html`
Sure you can, but unfortunately, you need to use call_user_func() to achieve this:
require_once 'template.php';
foreach (array("javascript","script","css") as $tag) {
echo call_user_func('template\\'.$tag);
}
Namespaces in PHP are fairly new. I'm sure that in the future, they will fix it so we won't require call_user_func() anymore.