if ($bo_table == 'free') {
define('BOARD', 2);
}
이렇게되어있는 되어있는걸 2개 더 추가해주고싶은데
if ($bo_table == 'free', 'qna', 'profile') {
이런식으로 해야되나요?
|
답변 4개
채택된 답변
+20 포인트
마르스컴퍼니
2023-01-03 (화) 17:29:58
if (in_array($bo_table, array('free', 'qna', 'profile')) {
마당쇠151
2023-01-03 (화) 15:30:26
Copy
if (in_array(['free', 'qna', 'profile'], $bo_table) {
define('BOARD', 2);
}
2023-01-03 (화) 11:54:51
swich( $bo_table) {
case 'free':
case 'qna':
case 'profile':
// 원하시는 내용
}
2023-01-03 (화) 11:36:31
Copy
if ($bo_table == 'free' || $bo_table == 'qna' || $bo_table == 'profile') {
답변을 작성하려면 로그인이 필요합니다.