I think you missed something:
<?
connect_to_database();
parse_query();
execute_query();
?>
<TABLE>
<?
while (fetch_row_from_query()){
$output = data_from_fetched_row();
$more_output = more_data_from_fetched_row();?>
<TR>
<TD><?echo $output?></TD>
<TD><?echo $more_output?></TD>
</TR>
<?}?>
</TABLE>
tell me that's not easier on your eyes :) Another nice thing about
doing it this way is you can work with a web designer who uses a
visual tool like dreamweaver.
On Fri, 12 Jan 2001 22:10:08 +0100, MR ([EMAIL PROTECTED])
wrote:
>Alex Black ...
>> <input type="text" name="hello" size="20" value="<?=$value?>">
>>
>> is really not that much harder to write.
>>
>> html people can ignore it, php can find their code, and those that
>>know both
>> can reap the benefits.
>>
>> what about loops?
>
>You mean that this code
>
>
><?
>connect_to_database();
>parse_query();
>execute_query();
>
>echo "<TABLE>";
>
>while (fetch_row_from_query())
> {
> $output = data_from_fetched_row();
> $more_output = more_data_from_fetched_row();
>
> echo "<TR><TD> $output </TD><TD> $more_output </TD></TR>";
>
> }
>echo "</TABLE>";
>?>
>
>
>
>would be better if it were written this way? :
>
>
><?
>connect_to_database();
>parse_query();
>execute_query();
>?>
><TABLE>
><? while (fetch_row_from_query()) : ?>
>
><? $output = data_from_fetched_row();
> $more_output = more_data_from_fetched_row(); ?>
>
> <TR><TD><?=$output?></TD><TD><?=$more_output?></TD></TR>
>
><? endwhile; ?>
></TABLE>
>
>
>
>I _personally_ prefer the upper implementation, as all my web
>developing team (that is, only me :-) know both PHP and HTML and
>don't
>like the code to be *plagued* of <? ?> <? ?> <? ?> as in above
>example.
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: php-list-
>[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]