I have a variable $GrandTotal
Each time I look through a database I want to add to it
while ($row = $result.>fetch_assoc()){ $GrandTotal = $GrandTotal + $row['MyCount']; }
This does not work, why? How should I do it?
Could it be the typo? Is there a reason you're not doing the addition in the database query? Could it be any one of a million other things that can't be ruled out because so little information has been given?