Hey!
I got 3 variables:
$avegagrpsalj (this has a value of 22,20)
$avegagrpinkop (this has a value of 22,76)
$avegagrpskop (this should get a value of -2,46 after the following equation):
--------------------------(22,2)--------------(22,76)-----------(22,2)
$avegagrpskop = (($avegagrpsalj - $avegagrpinkop)/$avegagrpinkop)*100;
If I do it on my calculator:
((22,2-22,76)/22,76)*100= -2,46
I know the variables avegagrpsalj & avegagrpinkop have the right values because I do this at the end:
echo $avegagrpsalj;
echo "<br>";
echo $avegagrpinkop;
echo "<br>";
echo $avegagrpskop;
This keeps showing the value of $avegagrpskop to -3,34 instead of -2,46. I can't figure out why? :S