Re: web form data to arrays?
| From: | William Stokes | Date: | Wed, 17 Jan 2007 19:28:49 +0000 |
| Subject: | Re: web form data to arrays? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247254@lists.php.net to get a copy of this message | ||
I got it working like this:
$counter = 0;
foreach ($arr as $value) { //make the form
...
print "<input type=\"text\" name=\"ArrUpdate[$counter][]\" value
=\"$value[0]\">\n";
$counter++;
....
}
Now I have array $ArrUpdate which contains sub-arrays with the update data.
This can now be processed with another foreach loop
-Will
"Jochem Maas" <jochem@iamjochem.com> kirjoitti
viestissä:45AE5F69.3010808@iamjochem.com...
> Németh Zoltán wrote:
>> And how does it work? does it create a sub-array of $_POST?
>
> test it and find out:
>
> echo '<pre>'; var_dump($_POST); echo '</pre>';
>
>> And is it documented somewhere in the manual?
>
> more than likely.