PHPLazy 0 Posted February 8 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 Share this post Link to post Share on other sites
cyberRobot 111 Posted February 8 Have you looked into json_decode()? More information can be found here:http://php.net/manual/en/function.json-decode.php Share this post Link to post Share on other sites
PHPLazy 0 Posted February 8 Can you give one example Share this post Link to post Share on other sites
ginerjm 208 Posted February 8 Can you NOT read the manual??? Share this post Link to post Share on other sites
Barand 1,258 Posted February 8 1 hour ago, PHPLazy said: Can you give one example Examples here Share this post Link to post Share on other sites