$income01 = 25000;
$income02 = 15000;
$approxloan = 0;
if (($income01 > 0) and ($income02 == 0)) {
$approxloan = $income01*3.25;
}
else if (($income01 > 0) and ($income02 > 0)) {
$approxloan = ($income01*3.25)+$income02;
}
else if (($income01 = 0) and ($income02 > 0)) {
$approxloan = $income02*3.25;
}
else {
$approxloan = $income01;
}
The problem is that when i test $income01 using echo it prints 25000 but inside the if else if else it does not pick up neither of $income01 and $income02 i have even tried makin th variables global yet still have had no success.