Re: help with adding

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

 



 for ($i = 1; $i <= $sendnum; $i++)
 
 {
 
           $qty = $_POST['qty'.$i];
           $total = $total + $qty;
           echo $qty . '<br />';
 
 }
echo "Total $total";

<?php
/*

Stephen Johnson c | eh
The Lone Coder

http://www.thelonecoder.com
stephen@xxxxxxxxxxxxxxxx

562.924.4454 (office)
562.924.4075 (fax) 

continuing the struggle against bad code

*/ 
?>

> From: "Jay Fitzgerald" <jayfitz@xxxxxxxxx>
> Organization: Bayou Internet
> Reply-To: <jayfitz@xxxxxxxxx>
> Date: Thu, 24 Feb 2005 09:39:16 -0600
> To: <php-general@xxxxxxxxxxxxx>
> Subject:  help with adding
> 
> The code below is echoing the qty correctly (10, 5, 25)
> 
> 
> 
> for ($i = 1; $i <= $sendnum; $i++)
> 
> {
> 
>           $qty = $_POST['qty'.$i];
> 
>           echo $qty . '<br />';
> 
> }

-- 
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