$file = simplexml_load_file("http://www.cbr.ru/scripts/XML_daily.asp?date_req=".date("d/m/Y")); $valutes = array(); foreach ($file AS $el){ $valutes[strval($el->CharCode)] = strval($el->Value); } print_r($valutes);
На выходе имеем
Array
(
[AUD] => 31,8560
[AZN] => 40,9456
[GBP] => 50,2021
[AMD] => 86,7297
[BYR] => 57,6904
...