You are here: Re: echo or ?><?php « PHP Programming Language « IT news, forums, messages
Re: echo or ?><?php

Posted by SrSilveira on 06/14/07 00:57

On Jun 13, 8:23 pm, "Jon Slaughter" <Jon_Slaugh...@Hotmail.com> 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

i think it's better to stop the parser and write the html...
....?>
<div class="someclass">
<?=$MyString?>
</div>
<?...

it's easy to see the html and the php code...

 

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

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