I want to create a two dimensional array with index and with key in JavaScript, each row has the index and column has the key
myArray[0]=["S.No":"1", "Name":"abcd", "Age":"12"];
myArray[1]=["S.No":"2", "Name":"efgh", "Age":"15"];
myArray[2]=["S.No":"3", "Name":"ijkl", "Age":"20"];
So the output Should be
Array
(
[0] => Array
(
[S.No] => 1
[Name] => abcd
[Age] => 12
)
[1] => Array
(
[S.No] => 2
[Name] => efgh
[Age] => 15
)
[2] => Array
(
[S.No] => 2
[Name] => ijkl
[Age] => 20
)
)
How to do this in JavaScript?
Want an array like this for php from javaScript.