Ben çok boyutlu bir dizi var
$output=Array
(
[0] => Array
(
[0] => mov_1
[1] => MY FAIR LADY
)
[1] => Array
(
[1] => mov_10
[2] => love actually
)
)
and two variables
$avlblQnty=50
$success= true
i json yoluyla bu veri göndermek
echo json_encode( array('movieData'=>$output,'stock'=>$avlblQnty,'sucess'=>$success));
döndürür
{"movieData":[["mov_1","MY FAIR LAD],{"1":"mov_10","2":"love actually"}],"stock":0,"success":true}
but i need json encoded data properly so that i can create an select box on movieData using(movieData.length),
so for that i want json edcoded data in below format so that i can retrive successfully
{"movieData":[{"mov_1":"MY FAIR LAD,mov_10":"love actually"}],"stock":0,"success":true}
i bir dizi (çok boyutlu / ilişkilendirilebilir) göndermek için nasıl bilmek istiyorum ve bazı json ile birlikte varaibles?
UPDATE
Ben düzgün benim dizi yaptık ve ondan sonra ben aşağıya json kodlamak dizi alıyorum
{"movieData":{"mov_10":"love actually","mov_1":"my fair lady"},"stock":20,"success":true}
Now how to know the length of moveData? i used data.movieData.length on jquery where I'm getting these value but döndürür undefined