1 0 1 n o w.com
Search Engine All- in One Place !

php – Extract the currency rate from bank api


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

© 2023 All Rights Reserved. 101now.com ® is a free online search engine index services. 101now™ has large comprehensive directories for people all ages or any location where you can benefit and enjoy our platform. We provide up to date information and more on a daily basis.
Terms of Service | Privacy
newyorkconstructionco.com 101now.net 101now.org