답변 3개
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
if($ca_id === "10") 이렇게 해주세요.
아래 링크 참조해보세요
http://sir.kr/qa/126866">http://sir.kr/qa/126866
http://php.net/manual/kr/language.operators.comparison.php">http://php.net/manual/kr/language.operators.comparison.php
</span></p><p><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 187);"><?php
var_dump</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">(</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 187);">0 </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">== </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(221, 0, 0);">"a"</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">); </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(255, 128, 0);">// 0 == 0 -> true
</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 187);">var_dump</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">(</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(221, 0, 0);">"1" </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">== </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(221, 0, 0);">"01"</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">); </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(255, 128, 0);">// 1 == 1 -> true
</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 187);">var_dump</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">(</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(221, 0, 0);">"1" </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">== </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(221, 0, 0);">"1e0"</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">); </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(255, 128, 0);">// 1 == 1 -> true
</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">switch (</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(221, 0, 0);">"a"</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">) {
case </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 187);">0</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">:
echo </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(221, 0, 0);">"0"</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">;
break;
case </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(221, 0, 0);">"a"</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">: </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(255, 128, 0);">// never reached because "a" is already matched with 0
</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">echo </span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(221, 0, 0);">"a"</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 119, 0);">;
break;
}
</span><span style="font-family: "Fira Mono", "Source Code Pro", monospace; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 187);">?></span><span style="background-color: rgb(247, 247, 247); font-size: 12px; font-family: 돋움, Dotum, sans-serif; color: rgb(51, 51, 51);"> </span></p><p><span style="background-color: rgb(247, 247, 247); font-size: 12px; font-family: 돋움, Dotum, sans-serif; color: rgb(51, 51, 51);">
댓글을 작성하려면 로그인이 필요합니다.
제가 지금 작업중인데요..
http://khx.kr/shop/list.php?ca_id=10">http://khx.kr/shop/list.php?ca_id=10
여기에서 lnb 를 자체 작업중인데 리스트에서는 lnb 에서
<li <? if($ca_id == "10") { echo "class=over"; } ?>><a href="<?php echo G5_URL ?>/shop/list.php?ca_id=10">패션</a></li>
이렇게 오버효과를 주는데 상품 클릭해서 정보보기 들어가도 이 상품의 분류가 10 일 때는 over 를 줘야 하는데요.. 잘 안되네요..
답변에 대한 댓글 3개
이렇게 한 건 맞습니다. 소스보기 해보면 10일 때만 over 가 있을 겁니다.
현재분류명 10과 상품이 속한 분류명 10 이 같다면 까지 걸어줘야 오버가 유지가 되는데
잘안되네요^^;
if($ca_id == "10" || $it['ca_id'] == "10") {
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인