마지막 라인이 안나오게 하고싶은데요

마지막 라인이 안나오게 하고싶은데요

QA

마지막 라인이 안나오게 하고싶은데요

답변 3

본문

메인타입 수정해서만들었는데
마지막 선은 없었으면 좋겠데 마지막 라인까지 생겨서
 
마지막 라인은 안나오게 하려면 어떻게 해야 하나요
 
 
원본에는 for ($i=0; $row=sql_fetch_array($result); $i++)
{
    if ($i > 0 && $i % $list_mod == 0)
        echo "</tr>\n\n<tr>\n";
소스가 있엇는데..
여기저기 넣어봐도 오류만생기고 그러네요
-------------------------------------------------------------------------------------
<table width="100%" border=0 align="center" cellpadding=0 cellspacing=0><tr>
<?
$sql = "select * from $g4[yc4_item_ps_table] where is_confirm = 1  order by is_id desc limit 3 ";
$result = sql_query($sql);
        for ($i=0; $row=sql_fetch_array($result); $i++)
        {
  
$star = get_star($row[is_score]);
$is_name = get_text($row[mb_id]);
$is_subject = strip_tags($row[is_subject]);
$is_subject = cut_str($is_subject, 40, "…");
$is_content = strip_tags($row[is_content]);
$is_content = cut_str($is_content, 120, "...");
$image = get_it_image("$row[it_id]_s", 200, 200, $row[it_id]);
$is_time = substr($row[is_time], 0, 10);
?>
<td valign=top><table width="220" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><?=$image?></td>
  </tr>
  <tr>
    <td align="center"><a href="/youngcart4/shop/item.php?it_id=<?=$row[it_id]?>#review_item">
<?=$is_subject?></a></td>
  </tr>
  <tr>
    <td align="center"><a href="/youngcart4/shop/item.php?it_id=<?=$row[it_id]?>#review_item"><?=$is_content?></a>   [<?=$is_name?>님]</td>
  </tr>
</table></td>
<?
// 이미지 오른쪽에 구분선을 두는 경우 (이미지로 대체 가능)
    if ($i%$list_mod!=$list_mod-1)
     echo "<td width=1  bgcolor='#EFEFEF'></td>";
}
// 나머지 td 를 채운다.
if (($cnt = $i%$list_mod) != 0)
    for ($k=$cnt; $k<$list_mod; $k++)
        echo "<td> </td>\n";
  ?></tr>
</table>
</div>

이 질문에 댓글 쓰기 :

답변 3

$list_mod 값을 얼마로 설정한 것인가요?
$list_mod =3; 으로 하면 다른 수정 필요 없을텐데요?

어디에 어떤 줄을 안나오게 하고 싶으신지는 모르겠지만
 
if ($i == $board[bo_page_rows] -1) {
echo "마지막줄 출력안함";
}else{
echo "출력함";
}
 
참고해보세요.
답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 125,873
© SIRSOFT
현재 페이지 제일 처음으로