I am trying to get weather data from this XML: https://www.yr.no/sted/Norge/Vestland/Bergen/Bergen/varsel.xml
I would like to display like this:
I have no idea where to start.
$url = ('');
function Feed($url) {
$feed = simplexml_load_file($url) or die('Can not connect to server');
$result = array();
foreach ($feed->channel->item as $content) {
array_push($result, $content);
}
}
?>
Found an example ^ but did'nt get it to work... Quite unexperienced, any help is appreciated.
