Re: help with adding
| From: | Leif Gregory | Date: | Fri, 25 Feb 2005 18:00:07 +0000 |
| Subject: | Re: help with adding | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-209418@lists.php.net to get a copy of this message | ||
Hello Jay,
Thursday, February 24, 2005, 8:39:16 AM, you wrote:
J> I have messed with this for a couple of days and cant get it right.
J> Maybe I need sleep :-)
J> The question is, how would I take add each of these numbers (10+5+25)?
for ($i = 1; $i <= $sendnum; $i++)
{
$qty = $_POST['qty'.$i];
$tot += $qty;
echo $qty . ' --- Total so far is: ' . $tot . '<br />';
}
--
Leif (TB lists moderator and fellow end user).
Using The Bat! 3.0.2.3 Rush under Windows XP 5.1
Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB