I can\'t seem to figure out how to get a JS array into PHP.
What I have to work with looks like this:
var arrLow = [
{
\"e\": \"495864\",
\"rank\": \
//define javascript array
>var mainArray = {};
> // inner loops
mainArraySub['XXX'] = [];
mainArray = JSON.stringify(mainArray);
passing javascript array content in jquery ajax request as
$.ajax({
type: "POST",
data:{paramval:mainArray},
dataType: "json",
url: url,
success: function(msg){
}
});
in POST request you will get as below
{"row1":{"0":{"nnnn":"aaaa"},"1":{"Movie":"aaaa"},...}
// in a.php file call as below
$Info = $_REQUEST['rowdata'];
$tre = json_decode(stripslashes($Info),true);
var_dump($tre);