Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- better to open/close PHP or echo HTML?
March 8, 2007, 5:32 pm
rate this thread
more efficient on the parser, server, whatever. Staying in one parse
"session" and echoing HTML output or entering and leaving PHP and
leaving HTML to be presented "naturally":
echo "<html><body>stuff $var stuff";
echo "stuff $var2 stuff </body></html>";
<html><body>stuff <?= $var ?> stuff
stuff <?= $var2 ?> stuff</body</html>
Re: better to open/close PHP or echo HTML?
I'd probably look at it more as a style and a way to organize than a performance
issue. If you have lots of PHP variables in your HTML then that likely has
greater affect as the number of variable increases using either method, but
would probably need a significant level to notice the difference. Would be an
interesting test to see how much of a difference there is.
75+ Days Retention!
Higher levels of article completion!
Broader newsgroups coverage