sorry i got a stupid question i know but i'm in trouble, i'm unable to print the Countries from this array:
$array = json_decode('[
{
"Afghanistan": {
"lang": "en",
"browser_code": []
}
},
{
"Albania": {
"lang": "en",
"browser_code": []
}
},
{
"Algeria": {
"lang": "en",
"browser_code": []
}
}
]');
my try:
foreach($array as $key){
foreach($key as $k){
echo $k;
}
}
i tryed in many ways using a foreach(){}
loop but i'm in trouble with the logic, i just have to print out:
Afghanistan, Algeria, Algeria
Any clue?