# If statement, multiple conditions for the same var

**URL:** https://forum.kirupa.com/t/if-statement-multiple-conditions-for-the-same-var/269332
**Category:** Uncategorized
**Created:** [August 26, 2008, 9:14am UTC](https://forum.kirupa.com/t/if-statement-multiple-conditions-for-the-same-var/269332 "2008-08-26T09:14:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fray](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@fray](https://forum.kirupa.com/u/fray)
#### Post date: [August 26, 2008, 9:14am UTC](https://forum.kirupa.com/t/if-statement-multiple-conditions-for-the-same-var/269332/1 "2008-08-26T09:14:09Z")

</div>

Hello guys and girls, this is not a life or death post but im just wondering if there is a way to get the following line of code to work…

if ( $var1 != (null && “”) ) {  
// Do something  
}

Its probably not allowed, and the workaround would probably defeat the purpose of writing shorter syntax, but let me know if you think its possible.
