As opposed to using an include, which executes the included php in the file...is it possible to save the contents of a php file to a variable - but with the php still intact and
How about this...
function getTemplate($file) { ob_start(); // start output buffer include $file; $template = ob_get_contents(); // get contents of buffer ob_end_clean(); return $template; }
Basically, this will get whatever $file is, and parse it with PHP, then return the output into a variable.
$file