I have the following input fields:
<input name='223' type='number' class='form-control score' value='70'>
<input name='224' type='number' class='form-control score' value='65'>
<input name='225' type='number' class='form-control score' value='87'>
What I want is to make the 'name' attribute as index of each 'value' in JavaScript for ajax posting. i.e get values as single array, map the names as the array indexes
Something like this:
array (
[223] => 70
[224] => 65
[225] => 87
)