|
Posted by Dan Tappin on 02/25/05 20:06
You could try:
for ($i = 1; isset( $_POST['qty'.$i] ); $i++)
{
$qty = $_POST['qty'.$i];
$total .= $qty;
echo $qty . '<br />';
}
echo $total;
Dan T
On Feb 24, 2005, at 8:39 AM, Jay Fitzgerald wrote:
> I have messed with this for a couple of days and cant get it right.
> Maybe I
> need sleep :-)
>
>
>
> The code below is echoing the qty correctly (10, 5, 25)
>
>
>
> for ($i = 1; $i <= $sendnum; $i++)
>
> {
>
> $qty = $_POST['qty'.$i];
>
> echo $qty . '<br />';
>
> }
>
>
>
> The question is, how would I take add each of these numbers (10+5+25)?
>
>
>
> Any help is appreciated.
>
>
>
[Back to original message]
|