latest 2줄 질문 입니다.꼭 좀 도와주세요

latest 2줄 질문 입니다.꼭 좀 도와주세요

QA

latest 2줄 질문 입니다.꼭 좀 도와주세요

본문


<?
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

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>"; 

수정 해 보세요

답변을 작성하시기 전에 로그인 해주세요.
전체 3
QA 내용 검색

회원로그인

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