PHP Kodu



$array = array('USD', 'EUR');

foreach ($array as $doviz) {
$json = "https://www.doviz.com/api/v1/currencies/".$doviz."/latest";
$json_file = file_get_contents($json);
$data = json_decode($json_file);
echo ''.$doviz.' Alış: '.round($data->buying, 2).'';
echo ''.$doviz.' Satış: '.round($data->selling, 2).'';
}

?>