게시판리스트 2줄 이상일때 카테고리 별로 나눌수 있나요? > 그누4 질문답변

그누4 질문답변

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

게시판리스트 2줄 이상일때 카테고리 별로 나눌수 있나요? 정보

게시판리스트 2줄 이상일때 카테고리 별로 나눌수 있나요?

본문

예를 들어
카테고리 이름이 a,b가 있을때
1.[a]제목     2.[a]제목     3.[a]제목
4.[a]제목     5.[b]제목     6.[b]제목

이렇게 됩니다.

여기서 제가 원하는건
1.[a]제목     2.[a]제목     3.[a]제목
4.[a]제목
5.[b]제목     6.[b]제목

현재 소스는 요거고.. 어떻게 변형하면 저런배열로 나올수 있는지 부탁드립니다.(꾸벅)
<? for ($i=0; $i<count($list); $i++) {
  $e_text = array("(",")"); //괄호 표시
  $list[$i][comment_k] = str_replace($e_text, "", $list[$i][comment_cnt]); //괄호 표시 변환으로 삭제

  if($list[$i][comment_k]!=null) {
   if ($list[$i][last] >= date("Y-m-d H:i:s", $g4['server_time'] - ($board['bo_new'] * 3600)))
      {
    $list[$i][comment_k] = "(<font color='#FF6600'><b>+{$list[$i][comment_k]} <img

src='{$board_skin_path}/img/icon_new.gif' border='0' style='margin-top:3'></b></font>)";
          //if($list[$i][comment_k]!=null) $list[$i][comment_k] = "<b>".$list[$i][comment_k]."</b>";
      }
      else
      {
          $list[$i][comment_k] = "({$list[$i][comment_k]})";
      }
  }

     if ($i && $i%$mod==0)
     echo "</tr><tr><td colspan='3' height='3'></td></tr><tr>";
 ?>
     <td width="<?=$td_width?>%">

      <table width=100% cellpadding=0 cellspacing=0>
    <tr>
        
            
     <td  width=100% height=18 valign=top><table width=100% cellpadding=0

cellspacing=0>
     <tr><td align=left height=10>
<? if ($is_checkbox) { ?><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? } ?>
<a href="$list[$i][href]"><b><?=$list[$i][subject]?></b></a></td></tr>
        </table>
    </td></tr>
    </td></tr></table>
    </td>
 <? }
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
    for ($i=$cnt; $i<$mod; $i++)
        echo "<td width='{$td_width}%'> </td>";
echo "</tr>";
?>

댓글 전체

<?php
function cmp($a, $b) { if ($a['ca_name'] == $b['ca_name']) {  return 0;  }  return ($a['ca_name'] < $b['ca_name']) ? -1 : 1; }

<?
usort( list, cmp);
 for ($i=0; $i<count($list); $i++) {
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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