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 포인트
2014-09-22 (월) 10:47:05
4개씩 2줄이면
if ($i && $i%4==0)
echo "</tr><tr><td height='2'></td></tr><tr>";
<?php echo latest("h_main1", 23, 8, 30); ?>
답변에 대한 댓글 2개
cjsrhkd0
2014-09-22 (월) 10:52:07
신경 써주셔서 감사 합니다. 근데 그렇게 넣으니깐 간격이 자꾸 벌어 지네요 ㅠㅠ 이건css 문제 겠죠 ?
cjsrhkd0
2014-09-22 (월) 11:16:24
뭐 때문인지 모르겠는데
저는
if ($i && $i%4==3)
이렇게 하니깐 되네요~
알려주셔서 감사합니다~
저는
if ($i && $i%4==3)
이렇게 하니깐 되네요~
알려주셔서 감사합니다~
2014-09-22 (월) 10:45:52
혹시 4개씩 2줄 말씀하시는 건가요?
2014-09-22 (월) 10:21:29
if($i%$rows == $rows-1){
이 부분을
if ($i && $i%2==0)
echo "</tr><tr><td height='2'></td></tr><tr>";
수정 해 보세요
답변에 대한 댓글 1개
cjsrhkd0
2014-09-22 (월) 10:30:06
http://cy329.com/ 메인에서 미혼회원 부분인데 원래는 이미지가 4장 인데 말씀하신것 처럼 바꿧더니 지금 사이트 처럼 되어있네요 ㅠ
답변을 작성하려면 로그인이 필요합니다.