Re: web form data to arrays?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry about that...yes it creates an array so...

<input type="text" name="names[]" value="Larry">
<input type="text" name="names[]" value="Curly">
<input type="text" name="names[]" value="Moe">

would create an array accessible from $_POST['names']

foreach($_POST['names'] AS $name){
echo $name;
}

...produces: LarryCurlyMoe


On 1/17/07, Németh Zoltán <znemeth@xxxxxxxxxxxxxx> wrote:
And how does it work? does it create a sub-array of $_POST?

And is it documented somewhere in the manual?

Greets
Zoltán Németh

On sze, 2007-01-17 at 10:54 -0500, Mike Smith wrote:
> <input type="text" name="name[]">
>
> *note the [].
>
> --
> Mike
>



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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux