PHP + RSS duplicate elements
<p>Im using this PHP to get a list of Title's from an RSS feed:</p>

<pre><code>&lt;?php require_once('magpie/rss_fetch.inc');
$rss = fetch_rss('http://live.visitmix.com/Sessions/RSS');

foreach ($rss-&gt;items as $item) { 
    $cat = $item['category'];
    $title = $item['title'];
        echo '&lt;li class="'.$cat.'"&gt;'.$title.'&lt;/li&gt;';
}

?&gt;
</code></pre>

<p>I want to use <code>&lt;category&gt;</code> and add it as the class, however the <code>&lt;category&gt;</code> element appears for each <code>&lt;item&gt;</code> 1,2,3,4 or more times depending on the Title. How can I take the category element and seperate each category with a space if there is more than 1?</p>
