Jump to content

sakhi

New Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by sakhi

  1. I have json code  and i want to prine only {"currency":"DOGE","available":"0","reserved":"420.000000000"} data.

    my json data

    [{"currency":"1ST","available":"0","reserved":"0"},{"currency":"DOGE","available":"0","reserved":"420.000000000"},{"currency":"ZSC","available":"0","reserved":"0"}]    

    I use this code

     <?php
      $ch = curl_init('http://arbitrage.adquash.com/balance.json'); 
     curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json'));
     $return = curl_exec($ch); 
      curl_close($ch); 
    $result=json_decode($return);
    echo "<pre>";
    foreach($result as $row){
      echo $row->$a['currency']['available']['reserved'];

    ?>

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.