|
Posted by Jerry Stuckle on 06/14/07 12:13
Jon Slaughter wrote:
> I have to output a lot of html stuff mixed with php and I'm curious if its
> better to echo the html code or stop the php parser temporarily to got into
> "html mode"? Is there any drawbacks to either method?
>
> e.g.,
>
> echo "<div class=\"someclass\">"
>
> or
>
> ?><div class="someclass"><?php
>
> (realize that this is just a simple example and is not meant to represent
> the actual code I will be writing)
>
> Thanks,
> Jon
>
>
Jon,
To me, it all depends. If it's something short, I'll generally just
echo it. If it's longer, I'll get out of PHP mode.
As ZedorBlat indicated, you won't notice any real performance impact one
way or the other. To me, it's all about readability.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|