# Checking for 2 conditions?

**URL:** https://forum.highend3d.com/t/checking-for-2-conditions/5597
**Category:** Maya
**Tags:** mel
**Created:** [January 13, 2003, 9:18pm UTC](https://forum.highend3d.com/t/checking-for-2-conditions/5597 "2003-01-13T21:18:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![radiation](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/r/439d5e/32.png) [@radiation](https://forum.highend3d.com/u/radiation)
#### Post date: [January 13, 2003, 9:18pm UTC](https://forum.highend3d.com/t/checking-for-2-conditions/5597/1 "2003-01-13T21:18:54Z")

</div>

whats a good way to check for 2 conditions? example:  
if thisAtrribute exists AND has a connection then doThis

---tom

---

<div class="post-metadata">

### Author: ![empleh](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/e/cc9497/32.png) [@empleh](https://forum.highend3d.com/u/empleh)
#### Post date: [January 13, 2003, 9:27pm UTC](https://forum.highend3d.com/t/checking-for-2-conditions/5597/2 "2003-01-13T21:27:56Z")

</div>

if(condition1 && condition2){...

}

I that what you mean?  
ww

---

<div class="post-metadata">

### Author: ![radiation](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/r/439d5e/32.png) [@radiation](https://forum.highend3d.com/u/radiation)
#### Post date: [January 13, 2003, 9:42pm UTC](https://forum.highend3d.com/t/checking-for-2-conditions/5597/3 "2003-01-13T21:42:08Z")

</div>

yes. what would be the proper syntax?

---

<div class="post-metadata">

### Author: ![empleh](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/e/cc9497/32.png) [@empleh](https://forum.highend3d.com/u/empleh)
#### Post date: [January 13, 2003, 9:48pm UTC](https://forum.highend3d.com/t/checking-for-2-conditions/5597/4 "2003-01-13T21:48:01Z")

</div>

I think that is the proper syntax.

if($i\<3 && $j \>5){..

}

I think essentially the two conditions on either side of the && need to evaluate to the same thing, either true or false.

What two things are you trying to test for so I can give a more descriptive answer.

ww
