I think to get the results you are wanting, you might try this.

<input type='text' name='address[]' value=''>
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($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 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 $_POST[]?

Example of ideal scenario that does not work:
case "process1":
for ($i=0;$i<$_POST[count];$i++)
{
$_POST[address$i]
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to