카테고리 이름 출력

· 2007-08-21 (화) 15:46:23 · 1665 · 2
최근게시물에서 카테고리 이름을 나오게 하고 싶은데 아래 빨간색 부분이 안나옵니다
아래 파랑색부분을 빨강위로 올리면 출력이 되지만 카테고리가 반복되서 나오기 때문에 안되구요
 
카테고리명
내용글1
내용글2
내용글3
 
이렇게 나오게 하고 싶습니다
 
 
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td width='232' height=25 align=center><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?> [ <?=$list[$i][ca_name]?> ] -more</a></td>
</tr>
<TR>
    <TD bgColor=#c0c0c0 height=1></TD></TR>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td align=center>
        <table width=95%>
        <tr>
            <td height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>  
            <?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list[$i]['href']}'>";
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
            else
                echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
            echo "</a>";
            if ($list[$i]['comment_cnt'])
                echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";
            // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
            // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
            echo " " . $list[$i]['icon_new'];
            echo " " . $list[$i]['icon_file'];
            echo " " . $list[$i]['icon_link'];
            echo " " . $list[$i]['icon_hot'];
            echo " " . $list[$i]['icon_secret'];
            ?></td></tr>
        <tr><td bgcolor=#EBEBEB height=1></td></tr>
        </table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
|

댓글 2개

2007-08-21 (화) 15:52:55
아래 코드를 참고하세요.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0) {?>
<tr>
<td width='232' height=25 align=center><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?> [ <?=$list[$i][ca_name]?> ] -more</a></td>
</tr>
<TR>
<TD bgColor=#c0c0c0 height=1></TD></TR>

<?}?>

<tr>
<td align=center>
2007-08-21 (화) 19:52:01
감사합니다 ^^
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
07-08-22 조회 1,602
07-08-22 조회 1,557
07-08-22 조회 1,664
07-08-22 조회 1,731
07-08-22 조회 1,768
07-08-22 조회 1,597
07-08-21 조회 2,197
07-08-21 조회 2,051
07-08-21 조회 1,728
07-08-21 조회 1,855
07-08-21 조회 1,817
07-08-21 조회 1,614
07-08-21 조회 1,484
07-08-21 조회 1,666
07-08-21 조회 1,696
07-08-21 조회 2,061
07-08-21 조회 1,762
07-08-21 조회 1,761
07-08-21 조회 1,671
07-08-21 조회 1,804