Re: eof bof in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux