0

XML yweather Nodes in PHP

Hello,..

I am kind of new to PHP, and my code is pasted below. When I try to add this code: $chill = $xml->channel->yweather:wind->chill;, I get this error: Parse error: syntax error, unexpected ':' in /home/prairiew/public_html/bomb.php on line.. Is there an good way to reference yweather elements without getting a colon error? Thanks in advance

<?php
$url = "http://weather.yahooapis.com/forecastrss?w=2465512";
$xml = simplexml_load_file($url) or die("feed not loading");

$description = $xml->channel->item->description;
echo $description;

?>

by
2 Replies

Recent Posts

in PHP Development