Re: Complex (or not so) array data form submission?

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

 



On Thu, Aug 4, 2011 at 2:04 PM, Jamie Krasnoo <jkrasnoo@xxxxxxxxx> wrote:
> Thanks. I think what I got hung up on was that I was trying this:
>
> name="addresses[][id]"
> name="addresses[][address1]"
> name="addresses[][address2]"
> name="addresses[][city]"
> name="addresses[][state]"
> name="addresses[][zip]"
>
> Which wouldn't have given the end result I sought, I don't think. Clear case
> of not seeing the forest for the trees.
>
> Jamie

It probably would have worked just fine. Not specifying the numeric
index means that PHP will depend on the order that the browser sends
the values, but they are generally sent in the order they appear on
the form. If the numeric index is important, it's better to provide it
explicitly.

Andrew

-- 
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