Re: if statements
[email protected] (Andrei Zmievski)
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
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. *