RE: [PHP] print vs. heredoc
| From: | Ralph Guzman | Date: | Tue, 08 Jul 2003 02:35:31 +0000 |
| Subject: | RE: [PHP] print vs. heredoc | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-154299@lists.php.net to get a copy of this message | ||
One way to get around having to edit backslashes is to echo using single
quotes. For example:
echo '<TABLE BORDER="0" WIDTH="100%"><TR><TD>' .
$variable .
'</TD></TR></TABLE>';
-----Original Message-----
From: Greg Donald [mailto:destiney@destiney.com]
Sent: Sunday, July 06, 2003 3:48 PM
To: Sparky Kopetzky
Cc: PHP General
Subject: Re: [PHP] print vs. heredoc
> I'm looking for opinions as to which is better, print or heredoc.
I prefer heredoc mostly because I do not enjoy editing html that is full
of
backslashes. I build up the html and only output anything at the end.
This
allows for custom compression, whitespace stripping, etc.
> print makes the code layout look nice and eazy to debug, where heredoc
IS
> faster but makes the code look like a nightmare and I'm pretty picky
about
> what looks good.
Sounds like you already have your mind made up.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php