this code is only bring back the last value in the array when it needs to add them all up any help would be welcome
$SQL = "SELECT * FROM cart WHERE price1";
$retid1 = mysql_db_query($db, $SQL, $cid);
if (!$retid1) { echo( mysql_error()); }
else {
while ($row65 = mysql_fetch_array($retid1)) {
$aa = $row65["price1"];
$a = array($aa);
}
echo "sum(a) = ".array_sum($a)."\n";
}