복수게시판 추가방법
본문
if ($bo_table == 'free') {
define('BOARD', 2);
}
이렇게되어있는 되어있는걸 2개 더 추가해주고싶은데
if ($bo_table == 'free', 'qna', 'profile') {
이런식으로 해야되나요?
답변 4
if (in_array($bo_table, array('free', 'qna', 'profile')) {
if ($bo_table == 'free' || $bo_table == 'qna' || $bo_table == 'profile') {
swich( $bo_table) {
case 'free':
case 'qna':
case 'profile':
// 원하시는 내용
}
if (in_array(['free', 'qna', 'profile'], $bo_table) {
define('BOARD', 2);
}
답변을 작성하시기 전에 로그인 해주세요.