Post
Topic
Board Web Wallets
Re: API -> blockchain.info question
by
micaman
on 09/01/2016, 21:41:23 UTC
The function 'json_decode' returns an object.
In that object you have an array of txs.
Each of those txs is, again, of type object.
You don't need to replace anything on the '$json3' string.

Code:
$json_url3 = "https://blockchain.info/da/unconfirmed-transactions?format=json";
$json3 = file_get_contents($json_url3);
$data3 = json_decode($json3);

$tx_count = count($data3->txs);
$latesttx = $data3->txs[$tx_count-1]->hash;