채택완료
latest 2줄 질문 입니다.꼭 좀 도와주세요
Copy
<?if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?><style type="text/css">#package ul li div p.box1 img {width:100px; height:100px;}</style> <table width="<?php if($rows<count($list)) echo $rows*141; else echo count($list)*141;?>" cellpadding=0 cellspacing=0 border="0" class="table_info"><tr><?for ($i=0; $i<count($list); $i++) { if($list[$i][file][0][file]) { $file = "<img src='".$list[$i][file][0][path] .'/'. $list[$i][file][0][file]."' width=\"100\" >"; } else { $file=""; } $time_arr=explode(" ",$list[$i]["datetime3"]); $time_arr1=explode("-",$time_arr[0]); $year=$time_arr1[0]; $month=$time_arr1[1]; $day=$time_arr1[2]; $list[$i][wr_sung] = ($list[$i][wr_sung]=='성혼') ? "<font color='#ff0000'>[{$list[$i][wr_sung]}]</font>" : "";?> <td width="100"> <div id="package" > <ul> <li class="box"> <div> <p class="box1"><a href="<?php echo $list[$i]['href'] ?>"><?=$list[$i][wr_7]?"<span class=\"junggo\"></span>":""?><?=$file?></a></p> <p class="title" style="width:100px; height:15px; text-align:left; font-weight:bold; color:#f69340;">회원번호:<?=$list[$i]['wr_1']?> </p> <p class="tax"style="width:100px; text-align:left; font-weight:bold; color:#ff0000;"><?=conv_subject($list[$i]['wr_2'], 32, $cutopt="...")?> <?=$list[$i][wr_sung]?></p> </div> </li> </ul> </div> </td> <? if($i%$rows == $rows-1){ ?> </tr><tr> <? } } ?> <? if (count($list) == 0) { ?><tr><td align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?> </tr> </table>
ex)<?php echo latest("h_main1", 23, 4, 30); ?>
라테스트 한줄로 이미지가 나오는건데
이걸 2줄로 하고 싶은데 도저히 어떻게 해야 할지 모르겠네요 ㅠㅠ
회원님들 도와주세요 . ~
답변 3개 / 댓글 3개
채택된 답변
+20 포인트
4개씩 2줄이면
if ($i && $i%4==0)
echo "</tr><tr><td height='2'></td></tr><tr>";
<?php echo latest("h_main1", 23, 8, 30); ?>
if($i%$rows == $rows-1){
이 부분을
if ($i && $i%2==0)
echo "</tr><tr><td height='2'></td></tr><tr>";
수정 해 보세요
답변을 작성하려면 로그인이 필요합니다.