I have a javascript array : disharray = ([aa,11,],[bb,22])
I send this to php as a json object using - var jsoncvrt = JSON.stringify(disharray);
How do i extract the value of the nested arrays so that i can access values like : $a = aa and $b = 11?
I use the below code but get the output as
aa11
bb22
Please note, my server uses php 5.2
$data = json_decode(stripcslashes($_POST['strings']));
foreach ($data as $d => $v) {
foreach ($v as $v1 => $value) {
echo $value;
}
}
var_dump
of$data
? – sanketh yesterday$d=json_decode($_POST['str'],1);
$d[0][1]==11
,$d[1][0]=='bb'
– vp_arth yesterday