0

i am looking for a solution in wordpress on how to retrieve only one value from exchange api json

json is avaible at: LINK TO JSON

i would like to call value for Last variable in json and display it where code will be.

I tried several solutions, no luck for now

Thank you for your help!

  • yes i posted as answer :/ – Saso Robic Apr 13 '18 at 11:13
0

I found some articles on net on how to proceed, tried this code:

$url = 'https://api.crex24.com/CryptoExchangeService/BotPublic/ReturnTicker?request=[NamePairs=BTC_BZK,BTC_DOGE]'; // path to your JSON file $data = file_get_contents($url); // put the contents of the file into a variable $characters = json_decode($data); // decode the JSON feed

echo $characters[0]->PairName;

foreach ($characters as $character) { echo $character->PairName . '
'; }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.