<?php
$url = file_get_contents("https://api.coinmarketcap.com/v1/ticker/bitcoin-cash/");
$array = json_decode($url,TRUE);
// print_r($array);
$rate['price_usd'] = $array->{"bitcoin-cash"}->{"price_usd"};
$rate = $rate['price_usd'];
?>
<center><font color="black">Rate: 1 <font color="green">BCH/BitCoin Cash</font> = <?=$rate?> USD</font></center>
Hello the problem is the json_decode its not printing object price_usd anyone know how to print just the object price_usd
Thanks.