if (!in_array($forum['forumid'], array (x, y, z))) { $totalthreads += $forum['threadcount']; $totalposts += $forum['replycount']; }