Hi,
I am getting a wrong execution in logic and i cannot see anything wrong with the code and thus the only
reason this is failing maybe is a bug in Php itself.
That is please look at this code:
echo '<p>$num_fa: ' . $num_fa;
echo '<p>$nfa_2: ' . $nfa_2;
if ((0 > $num_fa) AND ($num_fa <= $nfa_2)) {
$payment_due = $fa_payment_1;
echo '<p>Hellow World 1';
} else if (($nfa_2 > $num_fa) AND ($num_fa <= $nfa_3)) {
$payment_due = $fa_payment_2;
echo '<p>Hellow World 2';
} else if (($nfa_3 > $num_fa) AND ($num_fa <= $nfa_4)) {
$payment_due = $fa_payment_3;
echo '<p>Hellow World 3';
} else if ($num_fa > $nfa_4) {
$payment_due = $fa_payment_4;
}
Now consider the values in the above code as have been printed out using echo command:
$num_fa: 3
$nfa_2: 5
Hellow World 2
So the code should execute to print Hellow World 1 but instead it is going to Hellow World 2!
What the HEK is going on?
Regards,