Menu
hi guys.. need a bit of a help here.. ?
well.. first of.. ill show u the code that im workin on..
so im extracting values from a db..
[code=php] while ($row = $db->fetch()) {
$amount1 = $row[amount1];
$amount2 = $row[amount2];
$totalAmount = $amount1 + $amount2;
echo $totalAmount;
}
echo $grandTotal;
and then at the very end, after looping through all the data, i wanted to show a grand total ($grandTotal)… which is the total of $totalAmount…
so how can i do this? any suggestions? thank you..