HTML Entry Array Elements with Numeric Keys

I am trying to use some html:

<input name="list_item[0][name]" />
<input name="list_item[1][name]" />
<input name="list_item[2][name]" />

When I look at the source of my document, I see it correctly. But when I check an element in chrome or firefox, the numbers increase by one! Therefore, I see:

<input name="list_item[1][name]" />
<input name="list_item[2][name]" />
<input name="list_item[3][name]" />

And when I check the data presented, the keys start with 1, not 0, which causes the wrong code in my code:

'list_item' => 
    array
      1 => 
        array
          'name' => string 'title 1' (length=7)
      2 => 
        array
          'name' => string 'title 2' (length=7)
      3 => 
        array
          'name' => string '' (length=0)

Why is this happening? O_o

+3
source share
1 answer

I don't know what exactly caused this, but it looks like these were some js; -)

+3
source

All Articles