I need to display an array PHP of data from file XML (https://pogoda.yandex.ru/static/cities.xml). I want in array all "id". Help me find the error. Thanks
<?php
$data_file_city="https://pogoda.yandex.ru/static/cities.xml";
$xml_city = simplexml_load_file($data_file_city);
foreach($xml_city->country as $key=>$value){
foreach ($value->city as $key1=>$value1) {
$id = array("$value1[country]");
echo $id;
}
}