PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $raw = '{ "lastUpdateId":4409859389, "bids":[ ["2.13000000","6472.90000000"], ["2.12900000","50106.20000000"], ["2.12800000","63127.60000000"], ["2.12700000","31495.40000000"], ["2.12600000","41493.30000000"] ], "asks":[ ["2.13100000","24755.90000000"], ["2.13200000","86227.50000000"], ["2.13300000","58302.20000000"], ["2.13400000","61187.90000000"], ["2.13500000","39494.50000000"] ] }'; $data = json_decode($raw, true); $bids = array_column($data["bids"], 1); $asks = array_column($data["asks"], 1); echo "Max bid: " . max($bids) ,PHP_EOL; echo "Max ask: " . max($asks) ,PHP_EOL;
Show:  
Copy Clear