OK I have cookie which is holding the values $cat_id which repersents and item stored in a database (MySQL) and the value $qty. using the $cat_id stored in the cookie, I use it to pull the value $price from the database and the value $qty. so if a user chooses 3 items the cookies is holding three $cat_id so I have three $price and three $qty.
I take these values and multiply them...
$s_total = $row[price] * $qty;
so if I disply them it looks like this
| price |qty|total
1.| 23.00 | 2 |46.00
2.| 33.00 | 1 |66.00
3.| 21.00 | 1 |42.00
What I want to do is add the $s_totals together to get a grand total. how can I do this.
Hope that clear.
TIA
Richie TM