Hello everyone.
please I have problem with printing out a value from inside an array of a nested json. ive tried several ways its always returns “index not define”.
here is the code .
$valr= “https://ice3.com/api/v1/orderbook/ticker”; ////////////////////////////source
$valrGet = file_get_contents($valr);
$valrD = json_decode($valrGet, true);
$valrSell = ["ask"] ["price"];
Here is the structure of the json from the source :
{“errors”:false,“response”:{“entities”:[{“pair_id”:3,“pair_name”:“BTC/ZAR”,“ask”:{“price”:“179382.54”,“amount”:“0.05357142”},“bid”:{“price”:“177229.4286563”,“amount”:“0.0011”}},{“pair_id”:4,“pair_name”:“BTC/NGN”,“ask”:{“price”:“8890000.00”,“amount”:“0.10”},“bid”:
my target is to output the value of (“price”) from “pair_name” BTC/ZAR
please help. thanks in advance