Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/26/2021 in all areas

  1. If you echo '<pre>$json = ', print_r($json, 1), '</pre>'; you get $json = Array ( [terms] => http://www.xe.com/legal/dfs.php [privacy] => http://www.xe.com/privacy.php [from] => USD [amount] => 1.195 [timestamp] => 2021-02-09T16:52:00Z [to] => Array ( [0] => Array ( [quotecurrency] => NGN [mid] => 454.6559871014 ) ) ) Then follow the array keys to the value you want So you need echo $json['to'][0]['mid']; // --> 454.6559871014 [edit] Alternatively foreach ($json['to'] as $price) { printf('%s %0.2f<br>', $price['quotecurrency'], $price['mid'] ); // --> NGN 454.66 }
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • 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.