arrays - json_decode find higest number -
using script:
$res3 = $kraken->querypublic('depth', array( 'pair' => 'etceur', 'count' => '10', )); print_r($res3);
i outcome:
array ( [error] => array ( ) [result] => array ( [xetczeur] => array ( [asks] => array ( [0] => array ( [0] => 11.82301000 [1] => 3.000 [2] => 1502789904 ) [1] => array ( [0] => 11.84197000 [1] => 75.000 [2] => 1502790546 ) [2] => array ( [0] => 11.84198000 [1] => 1.363 [2] => 1502789011 ) [3] => array ( [0] => 11.84583000 [1] => 1.291 [2] => 1502784501 ) [4] => array ( [0] => 11.86000000 [1] => 0.527 [2] => 1502790415 ) [5] => array ( [0] => 11.86567000 [1] => 1.291 [2] => 1502784504 ) [6] => array ( [0] => 11.86648000 [1] => 10.000 [2] => 1502788231 ) [7] => array ( [0] => 11.86705000 [1] => 1.548 [2] => 1502769256 ) [8] => array ( [0] => 11.88549000 [1] => 3684.586 [2] => 1502790575 ) [9] => array ( [0] => 11.88550000 [1] => 561.500 [2] => 1502790299 ) ) [bids] => array ( [0] => array ( [0] => 11.57920000 [1] => 41.789 [2] => 1502790507 ) [1] => array ( [0] => 11.57719000 [1] => 215.726 [2] => 1502790579 ) [2] => array ( [0] => 11.57275000 [1] => 600.000 [2] => 1502790167 ) [3] => array ( [0] => 11.56821000 [1] => 5.366 [2] => 1502789829 ) [4] => array ( [0] => 11.52550000 [1] => 75.000 [2] => 1502790547 ) [5] => array ( [0] => 11.52539000 [1] => 600.000 [2] => 1502790338 ) [6] => array ( [0] => 11.52536000 [1] => 2.683 [2] => 1502788964 ) [7] => array ( [0] => 11.52222000 [1] => 2.683 [2] => 1502788873 ) [8] => array ( [0] => 11.52119000 [1] => 2.683 [2] => 1502788713 ) [9] => array ( [0] => 11.52115000 [1] => 2.683 [2] => 1502788685 ) ) ) ) )
how find highest number in [result]->[xetczeur]->[asks]->[any_number]->[1] field , transfer [0] field $purchase_price allows me to: echo $purchase_price?
i assume need somekind of json_decode i'm not strong in section, least.....
Comments
Post a Comment