Morning,
Say I have a simple while loop which loops seven times:
while ($row = mysql_fetch_assoc($result))
{
$msg .= "Price: ".$the_price."\n\n";
}
How could I say while the loop is running add all the values of $the_price together and at the end of the loop produce the following with the total assigned to a variable called $total_price?:
$msg .= "Total Price: ".$total_price."\n\n";