die Auswahl nach Kriterien (Zeile 14) schlägt fehl. Wo hab ich da den Fehler?
<?
$xml = simplexml_load_file('http://apps.ricardo.ch/rss/getfeed.php?cat=41126&kind=kvE&lang=de');
$titel_count = count($xml->channel->item);
$titel_want = 100;
$rss_feed = '<div><a href="Ricardo" target="_blank"><H3>kurz vor Ende</H3></a></div>';
if($titel_count < $titel_want)
{$titel_want = $titel_count;}
for($i=0;$i<$titel_want;$i++) {
$wert = $xml->channel->item[$i];
$titel = $wert->title;
$beschrieb = $wert->description;
$hits = array("Lokomotive", "Bogenweiche");
if (in_array($titel, $hits)) {
echo "Wort enthalten";}
$news=str_replace("ö", "ö", $titel);
$news=str_replace("Ãœ", "Ü", $titel);
$news=str_replace("ü", "ü", $titel);
$news=str_replace("ä", "ä", $titel);
$news=str_replace("ß", "ß", $titel);
$news=str_replace("–", "-", $titel);
$news=str_replace(''', "`", $titel);
$news=str_replace("&", "&", $titel);
$news=str_replace("Ö", "Ö", $titel);
$news=str_replace("„", "\"", $titel);
$news=str_replace("“", "\"", $titel);
$news=str_replace("–", "-", $titel);
$news=str_replace("„", "\"", $titel);
$news=str_replace("“", "\"", $titel);
$news=str_replace("„", "\"", $titel);
$news=str_replace("–", "-", $titel);
$news=str_replace("–", "-", $titel);
$news=preg_replace("/\r|
/s", "", $titel);
$rss_feed .= "<html>
<body>
<tr>
<td width='1800'>".$titel."".$beschrieb."</td>
</tr>
</body>
</html>";
SetValue(35547 /*[WebFront Configurator]*/, $rss_feed);
}
?>