Просмотр поста

.
Хороший

Теги к постам вывожу с помощью функции

public static function tagline($article_id, $links = true, $selected = '')
    {
        $req = mysql_query("SELECT `tags` FROM `cms_articles_tags` WHERE `article_id`='$article_id' ORDER BY `tags` DESC");
        $html = '';
        $tags = mysql_num_rows($req);
	    if ($tags){
	       $t = 1;
	       while ($tag = mysql_fetch_assoc($req)){
	           if ($links){
	               if ($selected==$tag['tags']){
	                   $html .= '<a href="/search/tag/'.urlencode($tag['tags']).'" style="font-weight:bold;text-decoration:underline">'.$tag['tags'].'</a>rtttt';			
               	    } else {
	                   $html .= '<a href="/search/tag/'.urlencode($tag['tags']).'">'.$tag['tags'].'</a>';
                    }
           	   } else {
	               $html .= $tag['tags'];	
	           }
	           if ($t < $tags) { $html .= ', '; $t++; }
       	}
    } else {
	$html = '';
	}
	return $html;
    }