How to parse PHP output that has multiple arrays -
ok i'm using btc-e api , i'm calling using this:
$btc_usd = $btceapi->getpairticker('btc_usd'); // show information print_r($btc_usd);
and output print
array ( [ticker] => array ( [high] => 640.04199 [low] => 605.00201 [avg] => 622.522 [vol] => 4217103.07651 [vol_cur] => 6723.54768 [last] => 636.1 [buy] => 636.1 [sell] => 635.999 [updated] => 1394418227 [server_time] => 1394418228 ) )
how parse returns/prints number [last]
example:
so output looks "636.1" can save variable.
this array of arrays. outer element ticker
:
$btc_usd["ticker"]["last"];
Comments
Post a Comment