PHPLazy Posted February 8, 2019 Share Posted February 8, 2019 Hi, Anybody can help me to extract data from son using php {"location":{"woeid":2293962,"city":"Kasaragod","region":" KL","country":"India","lat":12.5174,"long":74.990662,"timezone_id":"Asia/Kolkata"},"current_observation":{"wind":{"chill":80,"direction":338,"speed":11.81},"atmosphere":{"humidity":70,"visibility":10.0,"pressure":29.8,"rising":0},"astronomy":{"sunrise":"6:54 am","sunset":"6:35 pm"},"condition":{"text":"Clear","code":31,"temperature":80},"pubDate":1549638000},"forecasts":[{"day":"Fri","date":1549564200,"low":76,"high":85,"text":"Sunny","code":32},{"day":"Sat","date":1549650600,"low":76,"high":85,"text":"Sunny","code":32},{"day":"Sun","date":1549737000,"low":75,"high":85,"text":"Sunny","code":32},{"day":"Mon","date":1549823400,"low":76,"high":87,"text":"Mostly Sunny","code":34},{"day":"Tue","date":1549909800,"low":76,"high":89,"text":"Sunny","code":32},{"day":"Wed","date":1549996200,"low":77,"high":88,"text":"Partly Cloudy","code":30},{"day":"Thu","date":1550082600,"low":76,"high":89,"text":"Mostly Sunny","code":34},{"day":"Fri","date":1550169000,"low":76,"high":86,"text":"Sunny","code":32},{"day":"Sat","date":1550255400,"low":76,"high":85,"text":"Sunny","code":32},{"day":"Sun","date":1550341800,"low":74,"high":85,"text":"Sunny","code":32}]} How to extract data of "current_observation" Thanks Link to comment Share on other sites More sharing options...
cyberRobot Posted February 8, 2019 Share Posted February 8, 2019 Have you looked into json_decode()? More information can be found here:http://php.net/manual/en/function.json-decode.php Link to comment Share on other sites More sharing options...
PHPLazy Posted February 8, 2019 Author Share Posted February 8, 2019 Can you give one example Link to comment Share on other sites More sharing options...
ginerjm Posted February 8, 2019 Share Posted February 8, 2019 Can you NOT read the manual??? Link to comment Share on other sites More sharing options...
Barand Posted February 8, 2019 Share Posted February 8, 2019 1 hour ago, PHPLazy said: Can you give one example Examples here Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.