How to get data from json API? [duplicate]Ask Question


This question already has an answer here:

i want get data from


how do I get a value of "26" in html table?


Here is what you need in PHP. You should read about json_decode here.

$json = '[{"access":"234","status":"ok","messages":"Success","data":{"ACCESS":"234","DATA":"26","LASTUPDATE":"2016-08-23T18:53:47.739+07:00","MINDELIVERY":"0"}}]';

$get = json_decode($json, true);
echo $get[0]['data']['DATA']; //26
标签: php html json api
© 2014 TuiCode, Inc.