0번째 첨부파일의 여부에따라 리스트에서 이미지 보여주기 채택완료
클립
8년 전
조회 2,243
리스트에서 첨부파일이 있고 없고에따라서 보여주는 이미지를 다르게 하고있는데요,
글쓰기시 첨부파일을 if(!$file[0][href]){ , if(!$file[1][href]){, 이런식으로 나누어놓아서,
if(!$file[0][href]){ 일때(첨부파일 0번째)에 파일 여부에따라 보여주는 이미지를 다르게하고싶어요.
</p>
<p>if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'" class="list_img">';
} else {
$img_content = '<img src="'.$board_skin_url.'/img/no_img.gif" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'" class="list_img">';
}
echo $img_content;</p>
<p>
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인