Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

evaluating zero problem

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
ArsMoriendi
Smarty n00b


Joined: 05 Jan 2004
Posts: 1

PostPosted: Mon Jan 05, 2004 7:27 pm    Post subject: evaluating zero problem Reply with quote

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
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Jan 05, 2004 8:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP