if (in_array($bbuserinfo['userid'], array(5,6,7))) { code you want here } elseif ($bbuserinfo['userid'] == '1') { code you want here } elseif ($bbuserinfo['usergroupid'] == '6') { code you want here }