I am getting something weird happening...
I am setting $cls to 8 via a very simple calculation, but then the if statement says it is not 8, even though I can echo out the value and confirm it is. I must be losing my mind or something!
<?php
$cls = ((0.1 + 0.7) * 10);
echo 'Number is ' . $cls;
if ($cls == 8) {
echo ', you are smart.';
} else {
echo ', you are nuts!';
}
?>
This produces "Number is 8, you are nuts!". Can someone explain what's happening here?