You are here: better to open/close PHP or echo HTML? « PHP Programming Language « IT news, forums, messages
better to open/close PHP or echo HTML?

Posted by mechphisto on 03/08/07 17:32

We're having this little debate here in the shop about which method is
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":

(a)
<?php
[stuff]
echo "<html><body>stuff $var stuff";
[stuff]
echo "stuff $var2 stuff </body></html>";
?>

(b)
<?php
[stuff]
?>
<html><body>stuff <?= $var ?> stuff
<?php
[stuff]
?>
stuff <?= $var2 ?> stuff</body</html>

any feedback?
Thanks!!
-Liam

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация