I have created this multidimensional array in javascript.
var arr = [];
arr[0] = [];
arr[0][0] = [];
arr[0][0][0] = [];
arr[0][0][0][0] = [];
and assigning values to the using this code
arr[0] = 1;
arr[0][0] = 2;
arr[0][0][0] = 3;
arr[0][0][0][0] = 4;
arr[0][0][0][0][0] = 5;
alert("arr ==> " + arr);
But it gives output as only 1, but the desired output is 1,2,3,4,5
When I do this alert(arr[0][0]); the desired output is 2 but it gives undefined.
Thanks for helping.
1,2,3,4,5. That being said, JavaScript is not PHP. Chances are you are using the wrong data structure.