최근게시물 이미지 질문좀 하겟습니다 정보
그누보드 최근게시물 이미지 질문좀 하겟습니다본문
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td>
<a href='<?="./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'>
<font color=#cc0001><?=$list[$i][subject]?></font>
<br>
<img src='<?=$list[$i][file_image1]?>' width=100 height=85 border=0 align=left>
<font color=#777777><?=cut_str(stripslashes($list[$i][content]),600,'…')?></font>
<tr><td colspan=3 height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>
</a>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
최근게시물에서 제목,이미지,본문을 뽑는데 이미지가 없을경우에 노이미지 대신에
그냥 제목,본문만 나오게 하고싶은데.. 어떻게 수정해야 하는지 알려주십시요
for문을 돌려야 하나요?
현재는 이미지가 없을때 그자리에 엑스박스가 생깁니다.
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td>
<a href='<?="./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'>
<font color=#cc0001><?=$list[$i][subject]?></font>
<br>
<img src='<?=$list[$i][file_image1]?>' width=100 height=85 border=0 align=left>
<font color=#777777><?=cut_str(stripslashes($list[$i][content]),600,'…')?></font>
<tr><td colspan=3 height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>
</a>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
최근게시물에서 제목,이미지,본문을 뽑는데 이미지가 없을경우에 노이미지 대신에
그냥 제목,본문만 나오게 하고싶은데.. 어떻게 수정해야 하는지 알려주십시요
for문을 돌려야 하나요?
현재는 이미지가 없을때 그자리에 엑스박스가 생깁니다.
댓글 전체