Re: if statements
[email protected] (Andrei Zmievski)
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 15 Feb 2000, Dan Libby wrote:
> I think ifs are somewhat evil. The same could be done with:
>
> Your search found {products_total} {match_plural}.
>
> Thus, the plurality logic remains in the PHP code. One argument against
> this is that it does not internationalize well.
> I don't have a good answer for that offhand.
Internationalization is another good point. That's why I don't think any
HTML/text should come from the PHP business logic - it should come from
either the config file or the template itself. Then it's easier to port
to different languages.
-Andrei
* We reason deeply, when we forcibly feel. *