Re: echo statements
| From: | Chris Shiflett | Date: | Fri, 18 Jul 2003 21:25:06 +0000 |
| Subject: | Re: echo statements | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155843@lists.php.net to get a copy of this message | ||
--- Jay Fitzgerald <jayfitz@bayou.com> wrote:
> When echoing html code that will include variables from a while or
> if loop, which method is best?
...
> Method 1: echo "<td align=\"left\" VALIGN=\"top\"><font
> class=\"dbtables\">$employer</font></td>";
> OR
> Method 2: <td align="left" valign="top"><font
> class="dbtables"><?php echo
>"$employer"; ?></font></td>
Method 2 is my choice.
> If you would, please give reasons why to support your opinion.
Readability and performance.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/