How to post array from javascript to php?

HabScape.com

New Member
I want to post an array using Jquery Ajax to php. Is this possible ? ThanksEDIT:I tried following :\[code\]type: "POST",url: "path",data: "styles=" + strstyles + "&templateId=" + custTempId, //strstyles is an associative arraydataType: "json",success: function (data) { .....}\[/code\]but, styles hold no data. I spent a lot of time, before adding data type to the declaration. What can be the reason for "styles" being posted as null ?Second EditI want to post style sheet dom object and save the class names and properties to DB. With the above edit, adding datatype did not help. I think it is b'coz the string is not in json format as follows - \[code\] {"a":1,"b":2,"c":3,"d":4,"e":5}\[/code\]As the my string has double quotes, it is not following the format, and I think that's the reason, I'm getting an empty array. How can I handle this ?
 
Back
Top