Hi all,
Heres my problem, I want a certain amount of news topics from a rss feed show on a page,
works well in mozilla, but the dreaded IE don`t like it, could someone please tell me where i`m going wrong, heres the code,I am new to php, so apoligies beforehand for not knowing to much about this language. As you can see rss_item is a css class which gives font, colour etc. IE wont pick it up as a href link ?
<?php
require("MagicParser.php");
print "<ul id='rss_items' >";
function myRecordHandler($item)
{
print "<li class='rss_item' <a class='rss_item' href='".$item["LINK"]."'>".$item["TITLE"]."</a></li>";
}
print "</ul>";
$url = "http://http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml";
MagicParser_parse($url,"myRecordHandler","xml|RSS/CHANNEL/ITEM/");
?>
Thanks,
Neil
Thank yo so much,
How you spot things like that amazes me
(ooops, I just edited the wrong post and deleted most of your message.. sorry!!)
Too many hours hacking PHP and HTML I guess :)
PS - I notice there is also a double http:// in your $url variable...
Dave,
Brilliant script, works a treat, and if you like we`ll link to you,
or you want to keep it a secret ? :O)
Hi Neil,
It may be a cut'n'paste error, but I notice that your opening
<li>
is not closed...! You have:print "<li class='rss_item' <a class='rss_item' href='".$item["LINK"]."'>".$item["TITLE"]."</a></li>";
missing > here ------------^
Try this with the close angle bracket added:
print "<li class='rss_item'><a class='rss_item' href='".$item["LINK"]."'>".$item["TITLE"]."</a></li>";
...see if that makes a difference...