Hi,
I need some help for a seemingly simple problem.
For some reason (probably stupidity but hey) i can't get <= to evaluate correctly.
my code caluclates a percent difference which calculates fine.
however if the percent difference is equal to -10 the score should be 50 points, instead I keep getting 20 points.....
here is the if statement
if($percentdiff<=-20){
$market=70;
}elseif($percentdiff<=(-10) && $percentdiff>-20){
$market=50;
}elseif($percentdiff>-10 && $percentdiff<10){
$market=20;
}elseif($percentdiff>=10){
$market=0;
}
I have played around with brackets and || and && and other stuff but can't get it to evaluate correctly!?
Any expert insight will be greatly appreciated!
Cheers,
Yume