im trying to change one var to get and stuck
here is what I did:
var choices = [['Australia', 'au'], ['Austria', 'at'], ['Brasil', 'br']];
so this is working, and I want to change it on
$.getJSON('/modules/profile/readCountry.php',function(data){
arrays = data;
});
var choices = arrays;
but is not working
the php file is:
foreach($countryies as $countr => $countrv) {
$json[] = array($countrv,$countr);
}
header("Content-type:application/json");
$out = array_values($json);
echo json_encode($out);
and output is:
[['Australia', 'au'], ['Austria', 'at'], ['Brasil', 'br']]
how to fine out what is missing or is not working ?