I have this JSON file: http://api.nbp.pl/api/exchangerates/rates/A/EUR/?format=json and I need to display € exchange rate in my PHP file using echo. I created this but echo displays nothing.
<?php
$nbp = file_get_contents('http://api.nbp.pl/api/exchangerates/rates/A/EUR/?format=json');
$dane = json_decode($nbp,TRUE);
$kurs = $dane["rates"][0]["mid"];
?>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<h1><?php echo $kurs; ?></h1>
</body>
</html>
I doing something wrong? It's my first steps in JSON