Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

API json data show in laravel

$json_string =    file_get_contents("http://api.wunderground.com/api/7ec5f6510a4656df/geolookup/forecast/q/40121.json");
$parsed_json = json_decode($json_string, true);
$parsed_json = $parsed_json['forecast']['txt_forecast']['forecastday'];
//pr($parsed_json);

foreach($parsed_json as $key => $value)
{
   echo $value['period'] . '<br>';
   echo $value['icon'] . '<br>';
   // etc
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #API #json #data #show #laravel
ADD COMMENT
Topic
Name
2+5 =