|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ArsMoriendi Smarty n00b
Joined: 05 Jan 2004 Posts: 1
|
Posted: Mon Jan 05, 2004 7:27 pm Post subject: evaluating zero problem |
|
|
Hi folks-
I am having an issue where I need an if statement to check if a varialbe is >= zero, like this:
Code: |
{if $var >= 0}...print stuff...{/if}
|
Problem is, the above statement will not evaluate to true if $var is zero, but will if it's 1 or more. Any idea why this is? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Jan 05, 2004 8:37 pm Post subject: |
|
|
it evalutes to true here. are you sure your $var is 0? check with {$var|debug_print_var} right before the {if}. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|