05-14-2009, 10:25 PM
|
#8 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by Wildhoney
Also on the back of Salathe's mentioning of operator precedence, you could use the or to give you a different way of achieving the same thing. I can't say I've ever used it like this, but it's one to be aware of nonetheless.
php Code:
$szVar1 = $szVar2 or $szVar1 = 'Default'; var_dump($szVar1);
$szVar1 will equal "Default" if $szVar2 isn't set.
|
Wow that's a new one....and it actually looks quite confusing..LOL....(but I get it...)
|
|
|
|