Notes:
1. The array subscripts specified do not have to be numerical -- you can use strings as well. In that case $_POST['foo'] would be an associative array.
2. You don't have to specify indices at all in the names of your fields -- "foo[]" will work, too. This can be useful in cases where you don't care to maintain any relationships between fields. To collect input from a set of checkboxes, for example.
3. Using array subscripted field names really messes up JavaScript. If you need to reference the values of the fields in client-side JavaScript, you will not be able to using field names -- you'll have to use the JavaScript field arrays.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.