Page 1 of 1

[SOLVED] if statement for values in between 1 and 2

Posted: Fri Mar 19, 2004 12:11 am
by rush989
Hi there,

Im a beginner so be nice :D

Does anyone know how to write an if statement that will act when $overall is a value in between 1 and 2?

For instance if $overall="1.6" then the if statement will echo "Fair"

Thanks everyone!

Posted: Fri Mar 19, 2004 12:21 am
by markl999
if($overall > 1 && $overall < 2){ echo 'Fair'; }

Posted: Fri Mar 19, 2004 12:52 am
by rush989
thanks!