<?php if($rssItem){ foreach($rssItem as $item) {?><item> <title><?php sf_rss_filter($item->title) ?></title> <link><?php sf_rss_filter($item->link) ?></link> <category><?php sf_rss_filter($item->category) ?></category> <guid isPermaLink=\"true\"><?php sf_rss_filter($item->guid) ?></guid> <description><![CDATA[<?php sf_rss_filter($item->description) ?>]]></description> <pubDate><?php sf_rss_filter($item->pubDate) ?></pubDate></item><?php }}?>
<?php if($rssItem){ $array = array(); foreach($rssItem as $item) { if(!in_array($item->title,$array)){ ?><item> <title><?php sf_rss_filter($item->title) ?></title> <link><?php sf_rss_filter($item->link) ?></link> <category><?php sf_rss_filter($item->category) ?></category> <guid isPermaLink=\"true\"><?php sf_rss_filter($item->guid) ?></guid> <description><![CDATA[<?php sf_rss_filter($item->description) ?>]]></description> <pubDate><?php sf_rss_filter($item->pubDate) ?></pubDate></item><?php array_push($array, $item->title); } }}?>
Here's a relevant part:
What I need to do is make sure that if the title has been outputted before it does not show again, so there is no duplicates. Any ideas?
I was thinking of an if statment working on past outputs, but I don't know how.