<?php
$data = [
[
'hash' => '0xa35b44d7e2ff09f2c936d04ad53f472b3cae46b449ddd307b3bb0a9aa67aa7a0',
'from' => '0x87fdc1fd91cb8a7db0021f1d749027b7048874cb',
'to' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956'
],
[
'hash' =>'0x3f85168d763793e350b4273c531b055d37121b170a48675ba5decd80b62442d5',
'from' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956',
'to' => '0x1faae436c85a15f257f7ff7f02af1e608815bbd7'
],
[
'hash' => '0x621de75f0a2a880e17efc2c40a310223c38fa19b71b2dae375a9bc4d4d794a1a',
'from' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956',
'to' => '0x1faae436c85a15f257f7ff7f02af1e608815bbd7'
],
[
'hash' => '0x4a32e142b627a1541d0dc5605ef9c52b7f586f02ab502d13d0503321622ba435',
'from' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956',
'to' => '0x1faae436c85a15f257f7ff7f02af1e608815bbd7'
],
[
'hash' => '0x0b40f67a334aae4cd54977e5e4cd5f54a2157f75441d5143d1eed4ba70f19b8f',
'from' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956',
'to' => '0x1faae436c85a15f257f7ff7f02af1e608815bbd7'
]
];
$pa = strtolower('0xE460c28E4cE2e4aE0B934a3eeb8FD88134d26956');
$result = ['from' => [], 'to' => []];
foreach ($data as $set) {
if ($pa == $set['from']) {
$result['Sent'][] = $set['hash'];
} elseif ($pa == $set['to']) {
$result['Received'][] = $set['hash'];
}
}
echo "For $pa\n";
echo "Sent Transactions:\n\t" , implode("\n\t", $result['Sent']) , "\n";
echo "Received Transactions:\n\t" , implode("\n\t", $result['Received']);
preferences:
24.01 ms | 405 KiB | 5 Q