Hi,
I am using simpleXML and I want to loop though the feed to only display 5 shows using the position() method, but have no joy in getting it to work
foreach($xml->sortedXPath('TV[position() < 5 and ProgrammeName="MTV"]', 'TransmissionDate', SORT_DESC) as $i => $item)
{
print "<a href='?v=".$item->ID."&a=false' class='link'>\n";
print "\t<span class=\"text\">" .trunc($item->ShortSynopsis,25, " "). "</span>\n";
print "\t</a>";
}
any suggestions on how I can get this working
this is the XML data I am working with