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 t

RE: [PHP] Array in a Loop Question

2002-03-26 Thread Jeff Hatcher
for ($i=0;$i<$_POST[count];$i++) { echo $_POST['address' . $i] . ''; } 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]' f

Re: [PHP] Array in a Loop Question

2002-03-26 Thread John Fishworld
Brilliant thanks ! I've got three of these in my form ! lol > I think to get the results you are wanting, you might try this. > > > the address[] tells the form that this element is an array and when > submitted, will be converted into an indexed array on the process page. > > so you take this

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Jim Lucas [php]
I think to get the results you are wanting, you might try this. the address[] tells the form that this element is an array and when submitted, will be converted into an indexed array on the process page. so you take this new array on the process page and do something like this. foreach($addr

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. name=address$count value=>). Does anyon

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] . ''; } Concanate array key 'address' with $i -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884