최신글 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최신글 정보

최신글

본문

if문 좀 물어봅시다
<? for ($i=0; $i<count($list); $i++) { ?>
                <li class="list"><a href="<?=$list[$i]['href']?>" class="text3">· <?=$list[$i]['subject']?>&nbsp;<span style='font-size:8pt; color:#FF7575;'>(<?=$list[$i]['wr_comment']?>)</span></a></li>
<? } ?>
지금은 코멘트가 없으면 0으로 나타나는데 어떻게 if문을 넣으면 있을때만 나타나게 하지요?

댓글 전체

<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($list[$i]['wr_comment']) { ?>
                <li class="list"><a href="<?=$list[$i]['href']?>" class="text3">· <?=$list[$i]['subject']?>&nbsp;<span style='font-size:8pt; color:#FF7575;'>(<?=$list[$i]['wr_comment']?>)</span></a></li>
<? } ?>
<? } ?>

이렇게 하면 되려나..ㅜ
$list[$i]['comment_cnt'] 로 넣어보세요

common.lib.php 290번째 즈음에...
    $list['comment_cnt'] = "";
    if ($list['wr_comment'])
        $list['comment_cnt'] = "($list[wr_comment])";

    $list['comment_cnt'] = "";
    if ($list['wr_comment'] > 0)
        $list['comment_cnt'] = "($list[wr_comment])";
로 하시면 더 확실할 듯 합니다.
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT