I have loop and display this row
<?
if ($objResult["cashier_trans_Type"]=="out" ||
$objResult["cashier_trans_Type"]=="debit to customer" ||
$objResult["cashier_trans_Type"]=="debit") {
echo "0.00";
} else {
echo $Dofaa=number_format($objResult["cashier_trans_Value"],2);
}
?>
Now I would like to use a while loop in order to do the sum for the all columns: $Dofaa
How can I do this by php?
thanks
You don’t need a new loop. Just add to the total with each of you
elseloops.