表单字段中的多维数组

I have form field like this:

<input class="form-control js-invoice-product-search" placeholder="Product" autocomplete="off" type="text" name="data[products[0][name]]">

As you can see, field name is 'data[products[0][name]]'.

But then I submit the form, i get result like this:

 ["products[0"]=>
array(3) {
  ["name"]=>
  string(4) "test"

It looses bracket: "products[0" So if i have more than one product, i get 3 different elements with different names, instead of array.

Well, It was ridiculously simple solution. A bit shame, that I didn't tried it.

Instead name "array[key1[nestedone]]" you just need to use 'array[key1][nested1]'.

HTML is not PHP. :)