Re: function echo ' '
| From: | Tracker 1 | Date: | Tue, 25 Jun 2002 23:23:29 +0000 |
| Subject: | Re: function echo ' ' | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103853@lists.php.net to get a copy of this message | ||
"Chris Shiflett" <shiflett@php.net> wrote in message...
> I'm not sure about other people, but I can't stand this syntax. I can
> see no advantage to using this over:
>
> <a href="<? echo $address; ?>">
it is a matter of taste, if you have a block of code...
function showRow($strName,$strEmail) {
?>
<tr>
<td><?=$strName?><td>
<td><?=$strEmail?></td>
</tr>
<?php
}
this is a simple example, but it makes the html/output look more like
straigt html which is usually easier for designers to work with... many
people have to deal with external designers that may modify code, so
making the sections that they have to edit, as "simple" as possible,
is sometimes a good thing...
personally, I will often do all output from the php, instead of switching
context... but it is a matter of taste, coming from the asp world, it is
fairly common.
--
=======================================================================
Michael J. Ryan - tracker1[*at*]theroughnecks.com
Roughneck BBS: http://www.theroughnecks.net
telnet://theroughnecks.net
=======================================================================
Y!: aztracker1 - aim: azTracker1 - icq: 4935386 - msn: see email
One program for aim/icq/yahoo/msn/irc - http://www.trillian.cc/