카테고리 폴더형식으로 하는건데염 8개까지는 잘보이는데염 10개부터 에러나오는데 for문이 잘못된것같은데 햇갈리네염^^;; 정보
카테고리 폴더형식으로 하는건데염 8개까지는 잘보이는데염 10개부터 에러나오는데 for문이 잘못된것같은데 햇갈리네염^^;;
본문
<? if ($is_category) { ?>
<table width="718px;" align="left" cellpadding="0" cellspacing="0" border='0'>
<tr height="20"><td><a href="#" onClick="categoryMove();" class="templet" <?=(!$sca)?"style='color:#2B7037;'":"";?>><img src="<?=$board_skin_path?>/img/ico_folder.gif" border='0' align="absmiddle"> 전체 (<?=number_format($total_count)?>)</a></td></tr>
<tr height="20">
<?
$arr = explode("|", $board[bo_category_list]);
$str = "";
for ($i=0; $i<count($arr); $i++) {
$tot[$i] = mysql_result(sql_query("SELECT COUNT(wr_id) FROM $write_table WHERE ca_name = '".$arr[$i]."' "),0,0);
?>
<td width="25%"><a href="#" onClick="categoryMove('<?=urlencode($arr[$i])?>');" class="templet" <?=($sca == $arr[$i])?"style='color:#2B7037;'":"";?>><img src="<?=$board_skin_path?>/img/ico_folder.gif" border='0' align="absmiddle"> <?=$arr[$i]?> (<?=number_format($tot[$i])?>)</a></td>
<?
if($i == 3) echo '</tr><tr height="20">';
}
?>
</tr>
<tr><td height="5"></td></tr>
</table>
<? } ?>
>> 8개까지는 잘나오구염~ 8개이상부터 8개옆에 td 생겨서 나옵니다~~
<table width="718px;" align="left" cellpadding="0" cellspacing="0" border='0'>
<tr height="20"><td><a href="#" onClick="categoryMove();" class="templet" <?=(!$sca)?"style='color:#2B7037;'":"";?>><img src="<?=$board_skin_path?>/img/ico_folder.gif" border='0' align="absmiddle"> 전체 (<?=number_format($total_count)?>)</a></td></tr>
<tr height="20">
<?
$arr = explode("|", $board[bo_category_list]);
$str = "";
for ($i=0; $i<count($arr); $i++) {
$tot[$i] = mysql_result(sql_query("SELECT COUNT(wr_id) FROM $write_table WHERE ca_name = '".$arr[$i]."' "),0,0);
?>
<td width="25%"><a href="#" onClick="categoryMove('<?=urlencode($arr[$i])?>');" class="templet" <?=($sca == $arr[$i])?"style='color:#2B7037;'":"";?>><img src="<?=$board_skin_path?>/img/ico_folder.gif" border='0' align="absmiddle"> <?=$arr[$i]?> (<?=number_format($tot[$i])?>)</a></td>
<?
if($i == 3) echo '</tr><tr height="20">';
}
?>
</tr>
<tr><td height="5"></td></tr>
</table>
<? } ?>
>> 8개까지는 잘나오구염~ 8개이상부터 8개옆에 td 생겨서 나옵니다~~
댓글 전체
<?
if($i == 3) echo '</tr><tr height="20">';
}
?>
if($i==3) 이것은 $i 가 3이면 다음 부분을 출력해라 의 의미지요.
그런데 만일 10개를 불러 온다고 하면
if($i==3||$i==7) echo '</tr><tr height="20>';
이렇게 해 주면 되겠지요.
그런데 12개도 아니고 10개라 그렇다면 마지막에는 2개만 나올텐데 모양이 영~~~
if($i == 3) echo '</tr><tr height="20">';
}
?>
if($i==3) 이것은 $i 가 3이면 다음 부분을 출력해라 의 의미지요.
그런데 만일 10개를 불러 온다고 하면
if($i==3||$i==7) echo '</tr><tr height="20>';
이렇게 해 주면 되겠지요.
그런데 12개도 아니고 10개라 그렇다면 마지막에는 2개만 나올텐데 모양이 영~~~

아하 감사합니다~ 위로올라가저버리게 span으로 밑으로내려가게했습니다~
감사드립니다~
감사드립니다~