how to write if condition with and

327 views
Skip to first unread message

Lewis

unread,
Feb 25, 2012, 11:09:40 PM2/25/12
to raintpl
is this the right way? it seems not working

{if="($counter==0) && ($counter==2)"}

Rain

unread,
Feb 26, 2012, 12:02:28 AM2/26/12
to raintpl
Syntax is correct but the logic is not, $counter can't be 0 AND 2 at
the same time. May be you want to use the OR operator ||. It depends
what condition you wanted to execute!

Lewis

unread,
Feb 26, 2012, 4:48:15 PM2/26/12
to raintpl
yah, you're right, I screw up the logic
Thanks
Reply all
Reply to author
Forward
0 new messages