Reply to Re: [PHP] help with adding

Your name:

Reply:


Posted by Stephen Johnson on 02/25/05 20:01

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@thelonecoder.com

562.924.4454 (office)
562.924.4075 (fax)

continuing the struggle against bad code

*/
?>

> From: "Jay Fitzgerald" <jayfitz@bayou.com>
> Organization: Bayou Internet
> Reply-To: <jayfitz@bayou.com>
> Date: Thu, 24 Feb 2005 09:39:16 -0600
> To: <php-general@lists.php.net>
> Subject: [PHP] 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 />';
>
> }

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация