I would like to send a couple of arrays to my php with jquery and json, how do i do that?
Im working with:
$.ajax(
{
url: "script.php",
type: "POST",
data: ???,
dataType: "html",
success: function(tablehtml){
alert(tablehtml);
}
});
Typical i want to send along two arrays, and the php site would then produce a html table.
For instance: i want information about the users ["Tim", "Alan", "Kate"] for the months ["June", "July", "August"]
I expect to json_decode in my php script, but how to i pack and send the two arrays? :D