이미지가 있으면 보이고 없으면 안보이게 (if문 질문) > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

이미지가 있으면 보이고 없으면 안보이게 (if문 질문) 정보

이미지가 있으면 보이고 없으면 안보이게 (if문 질문)

본문

<? if ***** { ?>
<td bgcolor="white" align=center>
<table>
<tr>
<td width=120 align=center>기타이미지2</td>
</tr>
<tr>
<td width=120 align=center><img src="<?=$img[5]?>" width="90" height="70" style='border:1 solid #cccccc;'></td>
</tr>
</table>
</td>
<? } ?>

여기서 이미지가 있으면 보이고 없으면 안보이게 처리하려 합니다. <? if ***** { ?>에서 '******'에 어떻게 넣어줘야 하는지요..??

댓글 전체

네... 그렇게 했는데 안되더라구요..

<? if ($img[5]) { ?>
<td bgcolor="white" align=center>
<table>
<tr>
<td width=120 align=center>기타이미지2</td>
</tr>
<tr>
<td width=120 align=center><img src="<?=$img[5]?>" width="90" height="70" style='border:1 solid #cccccc;'></td>
</tr>
</table>
</td>
<? } ?>

<? if ($img[6]) { ?>
<td bgcolor="white" align=center>
<table>
<tr>
<td width=120 align=center>기타이미지2</td>
</tr>
<tr>
<td width=120 align=center><img src="<?=$img[6]?>" width="90" height="70" style='border:1 solid #cccccc;'></td>
</tr>
</table>
</td>
<? } ?>
<? $is_img = $img[5]; ?>

<? if ($is_img) { ?>
<td bgcolor="white" align=center>
<table>
<tr>
<td width=120 align=center>기타이미지2</td>
</tr>
<tr>
<td width=120 align=center><img src="<?=$img[5]?>" width="90" height="70" style='border:1 solid #cccccc;'></td>
</tr>
</table>
</td>
<? } ?>
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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