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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rush989
Forum Newbie
Posts: 4
Joined: Tue Feb 03, 2004 5:58 pm

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

Post 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!
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

if($overall > 1 && $overall < 2){ echo 'Fair'; }
rush989
Forum Newbie
Posts: 4
Joined: Tue Feb 03, 2004 5:58 pm

Post by rush989 »

thanks!
Post Reply