답변 2개
채택된 답변
+20 포인트
8년 전
1. wr_1값이 없으면 span 태그까지 숨기기
</p><p><?php if ($list[$i]['wr_1']==TRUE){?></p><p><span class="fz_gallery_content">대지위치 : <?php echo ($list[$i]['wr_1']) ?></span></p><p><?php } ?></p><p>
2. 값만 숨기기
</p><p><span class="fz_gallery_content">대지위치 : <?php echo ($list[$i]['wr_1']==TRUE)?$list[$i]['wr_1']:""; ?></span>
</p><p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
8년 전
안녕하세요. 인아이디어입니다.<br />
<br />
<div class="code-block-wrapper">
<button onclick="copyCodePrism(this)" class="copy-code-btn" style="position: absolute; top: 10px; right: 10px; z-index: 10; background: rgba(0,0,0,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 6px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: all 0.2s; backdrop-filter: blur(10px);" onmouseover="this.style.background='rgba(0,0,0,0.7)'; this.style.transform='translateY(-1px)'" onmouseout="this.style.background='rgba(0,0,0,0.5)'; this.style.transform='translateY(0)'">
<svg style="width: 14px; height: 14px; display: inline-block; vertical-align: middle; margin-right: 4px;" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
</svg>
<span class="copy-text">Copy</span>
</button>
<pre class="language-php"><code class="language-php"><?php
if (!empty($list[$i]['wr_1'])) {
echo '<span class="fz_gallery_content">대지위치 : '.$list[$i]['wr_1'].'</span>';
}
?></code></pre>
</div><br />
<br />
이렇게 처리하시면 될것같습니다.
<br />
<div class="code-block-wrapper">
<button onclick="copyCodePrism(this)" class="copy-code-btn" style="position: absolute; top: 10px; right: 10px; z-index: 10; background: rgba(0,0,0,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 6px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: all 0.2s; backdrop-filter: blur(10px);" onmouseover="this.style.background='rgba(0,0,0,0.7)'; this.style.transform='translateY(-1px)'" onmouseout="this.style.background='rgba(0,0,0,0.5)'; this.style.transform='translateY(0)'">
<svg style="width: 14px; height: 14px; display: inline-block; vertical-align: middle; margin-right: 4px;" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
</svg>
<span class="copy-text">Copy</span>
</button>
<pre class="language-php"><code class="language-php"><?php
if (!empty($list[$i]['wr_1'])) {
echo '<span class="fz_gallery_content">대지위치 : '.$list[$i]['wr_1'].'</span>';
}
?></code></pre>
</div><br />
<br />
이렇게 처리하시면 될것같습니다.
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인