$idArray = array(1,2,3,4);
can I write this line in HTML?
Felix's answer answers the question beautifully, but lacks the examples in my opinion.
This answer is prompted by the comment on Felix's answer.
can you specify keys using this method? – Qwerty Apr 27 '14 at 0:05
First off, to illustrate Felix's answer:
When the request is sent to the server it will be of the type Array.
Following is an example with keys. This will give you an array with two keys, two values each.
Finally here's an example with VueJS, which is what I was using as of this writing, which led me to this question.
I hope this will be helpful to any passersby.