최근글 코멘트 앞에 +를 넣고 싶은데
본문
최근글에서 코멘트가 있으면 바로 숫자가 나오는데
+ 뒤에 코멘트가 나오게 할려면 아래 소스를 어찌 해야 할까요?
최근글 입니다. +1
css는
.cnt_cmt {display:inline-block;margin-left:3px;color:#cb011b;font-size:11px;}
if ($list[$i]['comment_cnt'])
echo $list[$i]['comment_cnt'];
echo "<a href=\"".$list[$i]['href']."\">";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
echo $list[$i]['subject'];
if ($list[$i]['comment_cnt'])
echo $list[$i]['comment_cnt'];
echo "</a>";
답변 1
echo "<a href=\"".$list[$i]['href']."\">";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
echo $list[$i]['subject'];
if ($list[$i]['comment_cnt'])
echo "+".$list[$i]['comment_cnt'];
echo "</a>";
답변을 작성하시기 전에 로그인 해주세요.