My problem is: how to extract a single data from NBP api (only a value of usd rate) and assign it to a variable to make it usable in my php calculations later in script.
The bank address I mean is:
https://api.nbp.pl/api/exchangerates/rates/a/usd/?format=json
which gives the following result:
{“table”:”A”,”currency”:”dolar amerykański”,”code”:”USD”,”rates”:[{“no”:”016/A/NBP/2023″,”effectiveDate”:”2023-01-24″,”mid”:4.3341}]}
I have to add that I have never heard about Json before.
Thank you in advance,
Mark
I have used some previous clues from Stackoverflow, but they were too simplified and they did not meet my expectations.
Source link
php,json,api,currency
#php #Extract #currency #rate #bank #api