[PHP] Array in a Loop Question

2002-03-26 Thread Jeff Hatcher
I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count value=). Does anyone know how I can pull the values back out of the

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Julio Nobrega Trabalhando
for ($i=0;$i$_POST[count];$i++) { echo $_POST['address' . $i] . 'br'; } Concanate array key 'address' with $i -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho?

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Erik Price
On Tuesday, March 26, 2002, at 01:18 PM, Jeff Hatcher wrote: I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Jim Lucas [php]
and do something like this. foreach($address AS $k = $v) { echo $k : $v; } Jim Lucas www.bend.com - Original Message - From: Jeff Hatcher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 10:18 AM Subject: [PHP] Array in a Loop Question I have a form that gets

Re: [PHP] Array in a Loop Question

2002-03-26 Thread John Fishworld
, 2002 10:18 AM Subject: [PHP] Array in a Loop Question I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count value=). Does

RE: [PHP] Array in a Loop Question

2002-03-26 Thread Jeff Hatcher
for ($i=0;$i$_POST[count];$i++) { echo $_POST['address' . $i] . 'br'; } Concanate array key 'address' with $i This works fine and I also can do the address[] but my ultimate result is to put this in the database. So address='$_POST['address' . $i]' fails and address='$_POST[address][$i]'

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Erik Price
On Tuesday, March 26, 2002, at 02:12 PM, Jeff Hatcher wrote: So my question is how can I put this in the database without having to reassign my variable name? You have to jump out of the quoted string that represents your SQL query when you echo the value of the $_POST variable. Like