Copy
$tableList = ['notice','event','cs','aft','media','rss'];
//중략
<?php }else if( $bo_table==$tableList[0] || $bo_table==$tableList[1] || $bo_table==$tableList[2] || $bo_table==$tableList[3] || $bo_table==$tableList[4] || $bo_table==$tableList[5]){ ?>
코드 어떻게 줄일수있을까요..
답변 1개 / 댓글 1개
채택된 답변
+20 포인트
PureAni
2018-08-01 (수) 18:56:07
Copy
if (in_array($bo_table, $tableList)) {
// true
}
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.