[PHP] help with adding

2005-02-25 Thread Jay Fitzgerald
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

Re: [PHP] help with adding

2005-02-25 Thread Jochem Maas
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

RE: [PHP] help with adding

2005-02-25 Thread Jesse Castro
-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

Re: [PHP] help with adding

2005-02-25 Thread Stephen Johnson
(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

Re: [PHP] help with adding

2005-02-25 Thread Leif Gregory
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];

Re: [PHP] help with adding

2005-02-25 Thread Dan Tappin
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.

Re: [PHP] help with adding

2005-02-25 Thread Randy Johnson
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

Re: [PHP] help with adding

2005-02-25 Thread Richard Lynch
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 /'; }

Re: [PHP] help with adding

2005-02-25 Thread gustav
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)

Re: [PHP] help with adding

2005-02-25 Thread Jochem Maas
[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

[PHP] Help with adding an image to a table row

2004-03-17 Thread Mark
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

Re: [PHP] Help with adding an image to a table row

2004-03-17 Thread Arthur Pelkey
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

RE: [PHP] Help with adding an image to a table row

2004-03-17 Thread Chris W. Parker
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

Re: [PHP] Help with adding an image to a table row

2004-03-17 Thread Brian V Bonini
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