Hi there,
I was wondering how I could add together all the values of an array returned by a form. My form basically is like a shopping cart, consisting of a lot of checkboxs and I simply want to add the values of all the checkboxes together. For example:
$d1 = mysql_query("SELECT * FROM db WHERE 1");
while($d2 = mysql_Fetch_array($d2)) {
<input type=checkbox name=cb[] value=$data[db1num]>
}
That gets all the values from my database and I want to just add together the price field. I've already searched these forums and haven't really found a working solution to this, any help would be much appreciated.
Thanks