[MTOS-dev] testing var for empty before using in mt:loop
Timothy Appnel
tim at appnel.com
Thu May 1 15:34:17 PDT 2008
Meaning null or '' or 0? Yes. Meaning an array refeence with zero
elements? No. Not with mt:if in that position though I think the loop
would never start if coo_loops was a reference to an empty array
reference.
Anyway, the mt:if statement and others follows the standard Perl
evaluation of true and false values. Null, '' (blank string) or 0
(zero) is false and everything else is true.
<tim/>
--
Timothy Appnel
Appnel Solutions
http://appnel.com/
More information about the MTOS-dev
mailing list