Re: IF conditionals
[email protected] (Andrei Zmievski) Sat, 19 Feb 2000 11:16:35 -0600
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 19 Feb 2000, Monte Ohrt wrote:
> Currently, IF conditionals include =, !=, <, >, <=, >=.
>
> What about supporting an alternative syntax, like:
> eq, ne, lt, gt, lte, gte
Why?
> Also, how will the comparisons work if one is a number
> and one is a string?
>
> {{if 122 < "0123"}}
>
> We could separate the comparison behavior out with the syntax
> of the conditional operator, or we could let the php
> template engine intelligently decide how variables
> are compared with simple rules (I like the second idea, it's easier
> for a designer.)
The comparisons will be performed using PHP's internal comparison
functions which are smart enough to compare "0123" against 122 as a
number.
-Andrei
"In My Egotistical Opinion, most people's C programs should be indented
six feet downward and covered with dirt." -- Blair P. Houghton