First of all the json data in question is not an array but an object!
A simple way to visualise any piece of json data is to do this
<?php
$j = '{"time":{"updated":"Oct 26, 2015 12:54:00 UTC","updatedISO":"2015-10-26T12:54:00+00:00","updateduk":"Oct 26, 2015 at 12:54 GMT"},"disclaimer":"This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org","bpi":{"USD":{"code":"USD","rate":"283.9203","description":"United States Dollar","rate_float":283.9203},"GBP":{"code":"GBP","rate":"185.0732","description":"British Pound Sterling","rate_float":185.0732}}}';
print_r( json_decode($j) );
Which in this case will produce :-
stdClass Object
(
[time] => stdClass Object
(
[updated] => Oct 26, 2015 12:54:00 UTC
[updatedISO] => 2015-10-26T12:54:00+00:00
[updateduk] => Oct 26, 2015 at 12:54 GMT
)
[disclaimer] => This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchang
erates.org
[bpi] => stdClass Object
(
[USD] => stdClass Object
(
[code] => USD
[rate] => 283.9203
[description] => United States Dollar
[rate_float] => 283.9203
)
[GBP] => stdClass Object
(
[code] => GBP
[rate] => 185.0732
[description] => British Pound Sterling
[rate_float] => 185.0732
)
)
)
This quite simply tells you a) its an object with properties that are also objects etc etc and b) how to reference any property within the object.
So to get the exchange rate you want I would do :-
<?php
$j = '{"time":{"updated":"Oct 26, 2015 12:54:00 UTC","updatedISO":"2015-10-26T12:54:00+00:00","updateduk":"Oct 26, 2015 at 12:54 GMT"},"disclaimer":"This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org","bpi":{"USD":{"code":"USD","rate":"283.9203","description":"United States Dollar","rate_float":283.9203},"GBP":{"code":"GBP","rate":"185.0732","description":"British Pound Sterling","rate_float":185.0732}}}';
$bitExchange = json_decode($j);
// the GBP exchange rate will be
echo $bitExchange->bpi->GBP->rate;
// or if you prefer
echo $bitExchange->bpi->GBP->rate_float;