Re: help with adding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux