s0c0 Posted November 27, 2007 Share Posted November 27, 2007 I have a 2 dimensional javascript array, that I want to pass over to a PHP function via Ajax. When I use the json2.js file located here http://json.org/js.html for implementing json in javascript I don't get a jsonized array at all. Here is my code: var prodArr = JSON.stringify(productsArr); I think it is expecting that I am sending it an object. Prior to this I had been using the json.js file instead of json2.js and it worked fine using the toJsonString method. Not sure why they took this out of the new json, but I had to start using it since the original json conflicted with the mootools framework. Did I mention I really hate javascript sometimes and I am tired of typing json. Any help on this? Quote Link to comment Share on other sites More sharing options...
s0c0 Posted November 27, 2007 Author Share Posted November 27, 2007 From what I'm reading I now have to construct my arrays in an extremely retarded manner looking like this: var a = ["chris"]; In order to stringify them. If someone could show me the syntax for a 2 dimensional array I would be very happy. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.