I have a form that uses jquery to generate rows of input fields
these text inputs need to be tied into and array 1,2,3… with the sub array designating the value for a,b,c,d..
<td><input type="text" name="1[a]"/></td>
<td><input type="text" name="1[b]"/></td>
<td><input type="text" name="1[c]"/></td>
<td><input type="text" name="1[d]"/></td>
<td><input type="text" name="1[e]"/></td>
<td><input type="text" name="1[f]"/></td>
This is what i am getting
print_r($_POST);
Array ( [1] => S [1a] => 6 [1b] => 5 [1c] => 4 [1d] => 3 [1e] => 2 [2] => M [2a] => 6 [2b] => 5 [2c] => 4 [2d] => 3 [2e] => 2 )
I Want:
1 as the array and a,b,c,d… as the sub array with value
1[a]=value
1[b]=value
Thank you for your help!
In PHP you cannot have variable names starting with numbers, so call it “one” an it will work.