[PHP] echo statements

2003-07-18 Thread Jay Fitzgerald
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=topfont class=dbtables?php echo 
$employer; ?/font/td
If you would, please give reasons why to support your opinion.
Thanks

--
Jay Fitzgerald, Design Director - CPW-A, CPWDS-A, CPWDV-A, CECM-A, CWCSB-A
Bayou Internet - http://www.bayou.com
Toll Free: 888.30.BAYOU (22968)
Vox: 318.338.2034 / Fax: 318.338.2506
E-Mail: [EMAIL PROTECTED]
ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] echo statements

2003-07-18 Thread Chris Shiflett
--- Jay Fitzgerald [EMAIL PROTECTED] 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=topfont 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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] echo statements

2003-07-18 Thread Curt Zirzow
Jay Fitzgerald [EMAIL PROTECTED] 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=topfont class=dbtables?php echo 
 $employer; ?/font/td

method 2a:
  td class=dbtables?php echo $employer?/td

 If you would, please give reasons why to support your opinion.
 Thanks

 - readability 
 - less typing 
 - easier to type no \ or if using ' and  together when to use one or
   the other... etc etc etc
 - code is easier to read
 - never use the font tag.. bad.. evil...

 
Curt
-- 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php