This is what I want to accomplish:
In index.php:
[code=php]
$var = include(“conten t.php”);
echo $var;
[/code]
In content.php:
[code=php]
$outputStream = date("Y-m-d"); //some dynamic text
return $outputStream;
[/code]
but without needing the variable $outputStream, instead I want to be able to write "echo date("Y-m-d");" in content.php.
Can I get echo to send everything into a buffer and then print it all at once to the html-page? I am using the phplib template and i want to be able to send a whole phpfile as a variable.
Thanks!
In index.php:
[code=php]
$var = include(“conten t.php”);
echo $var;
[/code]
In content.php:
[code=php]
$outputStream = date("Y-m-d"); //some dynamic text
return $outputStream;
[/code]
but without needing the variable $outputStream, instead I want to be able to write "echo date("Y-m-d");" in content.php.
Can I get echo to send everything into a buffer and then print it all at once to the html-page? I am using the phplib template and i want to be able to send a whole phpfile as a variable.
Thanks!
Comment