제목을 뭐라고 적어야할지 몰라서;;;
Copy
<?php if($is_member){?><a href="<?php echo $list[$i]['wr_link1'] ?>" target="_blank"> <?php }?> <?php $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']); if($thumb['src']) { $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">'; } else { $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>'; } echo $img_content; ?> <?php if($is_member){?> </a> <?php }?>
회원일 경우에만 목록의 이미지에 링크가 걸리게끔 했는데요,
링크가 없을 경우가 문제가 되더라고요..
link1에 등록된 내용이 없을 경우 이미지만 나오게 조건 추가를 하고 싶은데 방법이 있을까요?
|
답변 1개 / 댓글 2개
채택된 답변
+20 포인트
2014-12-24 (수) 13:55:03
첫줄을 이렇게..
<?php if($is_member && $list[$i]['wr_link1']){?>
답변에 대한 댓글 2개
답변을 작성하려면 로그인이 필요합니다.