I have some if statements that read a variable from my mysql database and then echo out a number based on that variable. For some reason, the code below only echos out "1" and I dont know why. ($x is 670, but it still echos out 1)
CODE:
//connect to database and assign $x a int from database
if ($x<=100){
echo 1;
}
if ($x>=500 && $x<1000){
echo 2;
}
if ($x>=1000 && $x<2500){
echo 3;
}
if ($x>=2500 && $x<5000){
echo 4;
}
if ($x>=5000 && $x<7500){
echo 5;
}
if ($x>=7500 && $x<100000){
echo 6;
}
if ($x>=10000){
echo 7;
}
EDIT: I did something stupid in my code with connecting to the DB. Thanks for your help anyway. I appreciate it.