php - Need to grab double nested Bitcoin price data from json url

one text

Solution:

This might help

use json_decode(..,true) to turn the result into an associative array. This makes it relatively easy to reference the data you need.

<?php
$url = "http://api.bitcoincharts.com/v1/weighted_prices.json";
$arr = json_decode(file_get_contents($url), true);

echo $arr['USD']['7d'];

Output:

13305.62

Source