PHP Code:
$groups $x->xpath("list/document/content[@name='group']");
$groups array_unique($groups);

if (!empty(
$groups)){
echo 
'<ul class="groups">'.PHP_EOL;
echo 
'<li>'.implode('</li><li>''<a rel="category" href="page.php?tag='.urlencode($groups).'">'.$groups.'</a></li>').PHP_EOL;
echo 
'</ul>';


this is what I'm trying to do, any help appreciated.