I have a problem with my xml-php-script. XML doc: http://www.yr.no/place/Sweden/Stockholm/Stockholm/forecast.xml
$xmlstr = "http://www.yr.no/place/Sweden/Stockholm/Stockholm/forecast.xml";
//$vader = new SimpleXMLElement($xmlstr);
$vader = simplexml_load_file($xmlstr);
foreach ($vader->forecast->tabular->time->temperature as $temp) {
echo $temp->temperature, ' ', $temp->windSpeed, PHP_EOL;
}
I want temperature in a variable named: $temp