PHP: form input field names containing square brackets like field[index]
- by gidireich
Hi,
I've seen lot of code that handle forms, which creates input fields with names containing square brackets.
I understand that this is being somehow converted to PHP arrays when a PHP script examines the $_POST variable.
My questions about this:
What is the mechanism behind? At which point this names that merely contain brackets are converted to arrays? Is this a feature of the HTPP protocol? Of web servers? Of the PHP language?
Continuing the previous question, is this a commonly used hack or a normal programming tool?
What are (all) the rules of using brackets in input field names?
Can multidimensional arrays be created this way?
Thanks,
Gidi