How can I SUM values from a MySQL database just using PHP?
Basically I have this
while ($row = mysql_fetch_assoc($hire)) {
$cart_qty = $row[qty];
$cart_cost = $row[cost];
$math = $cart_cost * $cart_qty;
}
So now I need to do a SUM on $math to get a total.. Any ideas?