Re: eof bof in php
| From: | German Geek | Date: | Tue, 23 Dec 2008 21:53:25 +0000 |
| Subject: | Re: eof bof in php | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285021@lists.php.net to get a copy of this message | ||
Totally agree. Whenever i can i put html outside of php tags mainly because
the code gets more readable because in eclipse u get syntax highlighting
etc.
Tim-Hinnerk Heuer
http://www.ihostnz.com
On Wed, Dec 24, 2008 at 4:13 AM, tedd <tedd.sperling@gmail.com> wrote:
> At 2:21 PM -0500 12/22/08, Anthony Gentile wrote:
>
>> I would argue it is better practice as:
>>
>> <h1><?php echo 'Hello World'; ?></h1>
>>
>> than
>>
>> <?php
>> echo "<h1>Hello World</h1>";
>> ?>
>> Anthony Gentile
>>
>>
> Certainly, but all you have done here is to move your <?php ?> to different
> places.
>
> There is a threshold one reaches in deciding where is the "best" place to
> put the "<?php ... ?>" -- it's a personal choice.
>
> With me, a one liner is sufficient for me to use:
>
> <h1><?php echo 'Hello World'; ?></h1>
>
> For more than that, I usually:
>
> ?>
>
> html
>
> <?php
>
> I use heredoc for email text, but not for html. I do this primarily because
> I like the way my editor works for showing paired tags and braces. It makes
> it easy for me to check tag pairing.
>
>
> Cheers,
>
> tedd
>
>
> --
> -------
> http://sperling.com
> http://ancientstones.com
> http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>