I would like to access to the data inside an array of array that I'm sending with ajax to a .php page.
Creating the array of arrays in the function before sending
var xi = new Array(maxests);
$(".mtable").find(".allownumericwithdecimal").each(function(){
var nth = ((i) % maxests) + 3
var alt = $(this).parent().parent().find("td:first").html()
var est = $('.mtable').find("thead tr:first td:nth-child("+nth+")").html()
var pay = $(this).val()
xi[i] = new Array(alt,est,pay);
i++;
})
Output on php:
Array(
[data] => Array
(
[name] =>
[description] =>
[project] => 1
[ae] => [["Alternativa 1","Estado N. 1","1"],["Alternativa 1","Estado N. 2","23"],["Alternativa 2","Estado N. 1","33"],["Alternativa 2","Estado N. 2","43"]]
))
I would like to access the data inside ae.
echo $_POST['data']['ae'][0][0];
I'm trying this one, but not luck. How can I get the value of each one?