i use this code to send one dimension array of integer but how to make it sending and receiving two dimension array formed by combination of integer and string e.g. [number here]["text here"] but the url has a limit so that i can't make a big array
//Send data to php
var queryString ="?";
for(var t=0;t<alldays.length;t++)
{
if(t==alldays.length-1)
queryString+="arr[]="+alldays[t];
else
queryString+="arr[]="+alldays[t]+"&";
}
ajaxRequest.open("POST", "forbidden.php" + queryString, true);
ajaxRequest.send(null);
}
// Create a function that will receive data sent from the server(sended as echo json_encode($array))
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
var myArray = ajaxRequest.responseText.replace("[","").replace("]","").replace(/"/g,"").split(",");
for(var i=0; i<myArray.length; i++) { alldays[i] = parseInt(myArray[i]); }
}}