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
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
-Original Message-
From: Jay Fitzgerald [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 24, 2005 9:39 AM
To: php-general@lists.php.net
Subject: [PHP] help with adding
I have messed with this for a couple of days and cant get it
right. Maybe I need sleep
(fax)
continuing the struggle against bad code
*/
?
From: Jay Fitzgerald [EMAIL PROTECTED]
Organization: Bayou Internet
Reply-To: [EMAIL PROTECTED]
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
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];
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.
Try this:
$num=0;
for ($i = 1; $i = $sendnum; $i++)
{
$qty = $_POST['qty'.$i];
$num=$num+ $qty ;
}
echo $num;
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
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 /';
}
Hi there!
I guess
$sum =+ intval($_POST['qty'.$i]);
should be
$sum += intval($_POST['qty'.$i]);
/G
@varupiraten.se
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)
[EMAIL PROTECTED] wrote:
Hi there!
I guess
$sum =+ intval($_POST['qty'.$i]);
should be
$sum += intval($_POST['qty'.$i]);
yuo are corerct. ;-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have the following snippet of code that I cannot seem to find a way to
add an image to a TR. The line in question is the first one under the
else statement:
print TR BGCOLOR=\#381499\;
This line, I would like to show a image called backgrnd.png instead of
a backgound color.
Any help would
background=
Mark wrote:
I have the following snippet of code that I cannot seem to find a way to
add an image to a TR. The line in question is the first one under the
else statement:
print TR BGCOLOR=\#381499\;
This line, I would like to show a image called backgrnd.png instead of
a
Mark mailto:[EMAIL PROTECTED]
on Wednesday, March 17, 2004 9:24 AM said:
Any help would be much appreciated
as this is not a php related question and that this is a very basic
question it would be most beneficial for you to join a list like thelist
from http://evolt.org or webdesign-l (i
On Wed, 2004-03-17 at 12:23, Mark wrote:
I have the following snippet of code that I cannot seem to find a way to
add an image to a TR. The line in question is the first one under the
else statement:
print TR BGCOLOR=\#381499\;
This line, I would like to show a image called backgrnd.png
14 matches
Mail list logo