리스트에서 첨부파일이 있고 없고에따라서 보여주는 이미지를 다르게 하고있는데요,
글쓰기시 첨부파일을 if(!$file[0][href]){ , if(!$file[1][href]){, 이런식으로 나누어놓아서,
if(!$file[0][href]){ 일때(첨부파일 0번째)에 파일 여부에따라 보여주는 이미지를 다르게하고싶어요.
Copy
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;
|
답변 1개
채택된 답변
+20 포인트
2017-10-26 (목) 20:05:15
if ($list[$i][file][0][file]) {
echo "0번파일있음";
} else {
echo "0번파일없음";
}
게시판 설정에서 "목록에서 파일 사용" 체크박스 체크해야 합니다.
답변을 작성하려면 로그인이 필요합니다.