I need to see all addresses, amounts, and confirmations foreach transaction - except each array is different. How can I get all this information from the litecoind's response?
foreach($transactions as $transaction) {
echo '<br />' . $transactions[0]['address'];
echo '<br />' . $transactions[0]['amount'];
echo '<br />' . $transactions[0]['confirmations'];
}
Above is the PHP Code, the response comes from these lines:
$transactions = $litecoin->listreceivedbyaddress();
var_dump($transactions);
array(2) { [0]=> array(5) { ["address"]=> string(34) "LPwNe6JtUgXxWrdK26UMKJJrDwYzEzkUZY" ["account"]=> string(0) "" ["amount"]=> float(1) ["confirmations"]=> int(4) ["txids"]=> array(1) { [0]=> string(64) "9da67825c00cf01c991e2fa913cc82c59d558b4c41d8f4e3dcb8f862b81affec" } } [1]=> array(5) { ["address"]=> string(34) "LTfP4riFBn6ctQ9jbGyWZ2HswmUZKgrJbX" ["account"]=> string(0) "" ["amount"]=> float(1) ["confirmations"]=> int(537) ["txids"]=> array(1) { [0]=> string(64) "b9806a0adc91ef70e67341f7d0cf6f2c7422fac35e54062153318d4416f44eaf" } } }
This is what it returns:
LPwNe6JtUgXxWrdK26UMKJJrDwYzEzkUZY
1
4
LPwNe6JtUgXxWrdK26UMKJJrDwYzEzkUZY
1
4
As you can see it returns the same thing, how can I have it return the two different transactions? Thanks.