Re: [PHP Template] Re: if statements
| From: | Dan Libby | Date: | Tue, 15 Feb 2000 22:49:30 +0000 |
| Subject: | Re: [PHP Template] Re: if statements | ||
| References: | 1 2 3 | Groups: | php.template |
| Request: | Send a blank email to php-template+get-64@lists.php.net to get a copy of this message | ||
Or we could just forget about using a separate template at all and embed PHP in
our html.... it's a slippery slope.
Andrei Zmievski wrote:
> On Tue, 15 Feb 2000, Travis E. Sitzlar wrote:
> >
> > Personally, I like the 'if' concept as outlined below. But I am only one
> > voice out of XXX number... ;-)
> > </i>
>
> Another possibility would be to just embed php code in the template:
>
> <i>Your search found {products_total}
>
> <? if ({{products_total}} == 1): ?>
> matches.
> <? endif;
> if ({{products_total}} > 1): ?>
> match.
> </i>
>
> And then either the template is automatically evaluated depending on a
> flag or the developer can do eval() on the results of tpl_fetch().
>
> -Andrei
> * Black holes are where God divided by zero. *
Attachment: [text/x-vcard] Card for Dan Libby danda.vcf
Attachment: [text/x-vcard] Card for Dan Libby danda.vcf