# 2 or more variables get checked?

**URL:** <https://forum.kirupa.com/t/2-or-more-variables-get-checked/215212>\
**Category:** programming\
**Created:** [February 5, 2007, 2:09pm UTC](https://forum.kirupa.com/t/2-or-more-variables-get-checked/215212 "2007-02-05T14:09:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaelic](https://avatars.discourse-cdn.com/v4/letter/g/c0e974/32.png) [@Gaelic](https://forum.kirupa.com/u/Gaelic)\
**Post date:** [February 5, 2007, 2:09pm UTC](https://forum.kirupa.com/t/2-or-more-variables-get-checked/215212/1 "2007-02-05T14:09:30Z")

</div>

Hey all =)

```php

if ($variable1 == "something") {
-script here-
}

```

Is there a way I can make it so that **2** (or more) variables at the same time get 'if’ed?

As in:

if ($variable1 == “something”) AND ($variable2 == “something else”) {

Tried googling it and tried my usual php info pages, but didn’t find anything; any help would be appreciated!
