-1
I’m trying to get only the return of a variable of this "buy" api that would be the purchase value, but when I try it returns me the whole table, someone could enlighten me?
$data = json_decode(file_get_contents("https://broker.negociecoins.com.br/api/v3/btcbrl/ticker"));
echo "<pre>";
print_r($data);
echo "</pre>";
print_r($data->$buy);
– Lucas Brogni
@Lucasbrogni correcting, the correct is $data->buy
– Mauro Alexandre
It worked, thank you very much.
– Eduardo Cardoso dos santos