function isGroup($type, $groups_id) { if (isset($this->groups[$type])) { foreach ($this->groups[$type] as $data) { if ($data['groups_id'] == $groups_id) { return true; } } } return false; }