if 조건문 관련 문의

if 조건문 관련 문의

QA

if 조건문 관련 문의

본문

제가 뭘 놓치고 있는게 있나요?

 

echo $bo_table;
echo "<br>";
 if ($bo_table = "music" or $bo_table = "youtube" or $bo_table = "gallery") {$wrnone = "";} else {$wrnone = "class=plushidden   style=display:none;float:left;margin-right:5px;";}
echo $bo_table;
 

테이블에 따라서 스타일을 다르게 적용하려고 했는데 안되서..

script라는 테이블 목록(list_skin) 상단에서 위와 같이 조건문 걸고 출력해봤더니,

 

script

music 

이렇게 출력되네요.

 

script

script 

이렇게 출력되야 하는 거 아닌가요?

 

이 질문에 댓글 쓰기 :

답변 1

if 구문의 equal comparison 은 == 로 표현합니다.

 

https://www.php.net/manual/en/language.operators.comparison.php


// if ($bo_table = "music" or $bo_table = "youtube" or $bo_table = "gallery")
 if ($bo_table == "music" or $bo_table == "youtube" or $bo_table == "gallery")
답변을 작성하시기 전에 로그인 해주세요.
전체 0
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT