Thursday, 15 May 2014

ajax - How do I send a 2D array from jquery to php? -


I have a 2D array that I want to send to a php page with $ .ajax.

This is the code that creates an array:

 for  (var i = 0; i  

array is filled with nested ends and I use JSON.stringify to format it. However, when AJAX calls are made, all the empty objects ([]) are sent. What is wrong?

I may be wrong, but arr [i, j] There is no way to use multi-dimensional arrays in stylish languages, it would be arr [i] [j] .

IMHO works as a arr [i, j] , and uses only an index as j.


No comments:

Post a Comment