|
I have a question about performance. I want to capture a whole page as a variable and echo it back to the browser, but I'm not sure that it's the best idea. It seems to me like I'd only be making one call to the PHP interrupter, instead of over and over with a marked up page. Does anyone have any experience with this that can offer some advice?
Just for illustration:
<?php
$output = "<html><head><title>This is a test</title></head><body>This page is just a test";
$output.= call_some_function();
$output.= do_other_stuff();
$output.= "</body></html>";
echo $output;
?>
As opposed to :
<html>
<head>
<title>This is a test</title>
</head>
<body>
This page is just a test
<?php call_some_function(); ?>
<?php do_other_stuff(); ?>
</body>
</html>
|