Jump to content

if statement + numbers in a range with decimals


HDFilmMaker2112

Recommended Posts

Just looking to know if this is the proper way to implement this:

 

I need the below if to be true when any number between 100 and 1000 is the value of x, including say "105.55"

if($x>= 100 && $x <= 1000){
}

 

Basically I'm asking will a value of x with a decimal in it not cause the if statement to be true.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.