I've seen people doing this:
<input type="text" name="myText[]">
What is the purpose of the []? Is it supposed to autoindex so you get an array or list at the server when the form is submitted?
Thanks.
The purpose is to simulate an array. If you have 10 inputs named images[], you can access their values (in PHP) like this :
foreach ($_POST['images'] as $img)
{
// do something
}
images[], images[], images[] ...Yes, Its used to create an array... so you can have multiple inputs with the same name and processes them in php as an array. If you want to access the individual elements in jquery/javascript then give each of them a unique ID and/or class.