PHP 1 element per category in RSS

KIDJP

New Member
Guys, i have something like this:\[code\]$rss->feed = "http://nola.gosimian.com/rss_content.php"; if (!$rss->parse()) echo $rss->error; $column_count = 0; $i=0; while($i < 25) { $title = $rss->channel['ITEM'][$i]['TITLE']; $item_id = $rss->channel['ITEM'][$i]['ITEMID']; $title_clean = ereg_replace("[[:space:]]", "", $title); $credits = str_replace(' -cmd- ',',', $rss->channel['ITEM'][$i]['COMMENTS']); $credits_clean = str_replace(',Director||','', $credits); $credits_clean = ereg_replace("[[:space:]]", "-", $credits_clean); $desc = $rss->channel['ITEM'][$i]['DESCRIPTION']; $thumbnail = $rss->channel['ITEM'][$i]['SOURCE']; $media = $rss->channel['ITEM'][$i]['ENCLOSURE']['URL']; $date = $rss->channel['ITEM'][$i]['PUBDATE']; foreach($date as $date) { echo '<a href="'.get_option('home').'/player/'.$credits_clean.'/' . $item_id . '" title="' . $title . '"><img src="' . $thumbnail . '" width="190" height="115" class="thumbnail"></a>'; $column_count++; $i++; } /*if($column_count == 3) { echo '</tr><tr>'; $column_count = 0; }*/ }\[/code\]Is it possible to show only one item/entry of the RSS for each "Director" Element (if there are twelve directors, show twelve videos). ?Thanks so much!!
 
Back
Top