이미지가 있으면 보이고 없으면 안보이게 (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 ***** { ?>에서 '******'에 어떻게 넣어줘야 하는지요..??
<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>
<? } ?>
<? 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>
<? } ?>
<? 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>
<? } ?>