How to print an xml file to the screen in php?
This is not working:
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, \'http://rss.news.y
If anyone is targeting yahoo rss feed may benefit from this snippet
$Items) {
for($i = 0; $i < $level; $i++)
echo(" ");
/*if content more than one*/
if(!is_array($Items)){
//$Items=htmlentities($Items);
$Items=htmlspecialchars($Items);
echo("Item " .$key . " => " . $Items . "
");
}
else
{
echo($key . " =>
");
PrettyPrintArray($Items, $level+1);
}
}
}
PrettyPrintArray($featureRss, 0);
?>
You may want to run it in your browser first to see what is there and before looping and style it up pretty simple
To grab the first item description
You can see a demo here