|
Posted by Tim Roberts on 09/21/06 06:20
Peter Fox <peterfox@eminent.demon.co.uk.not.this.bit.no.html> wrote:
>
>Following on from James McIninch's message. . .
>>Certainly.
>>
>><?php for ($i=0; $i<100; ++$i) { ?>
>>value of $i is <i><?=$i?></i>.
>><?php } ?>
>
>or
>
><?php
> for ($i=0; $i<100; ++$i) {
> print("<td><font color=red>$i</font></td>\n");
>}
>?>
>
><?php
> for ($i=0; $i<100; ++$i) {
> $s = vsprintf('%3d </font> %4.2f",array($i,$i/7));
> print("<td><font color=red>$s</td>\n");
>}
>?>
I've never understood the aversion to the <?= construct in PHP. One of the
appeals of PHP is that I can write full PHP modules for the processing, and
HTML with <?= escapes for the presentation side. It's like having a
built-in templating engine.
If I have to write everything out in PHP code, I might as well use a more
sopisticated language.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
[Back to original message]
|