Quote:
Originally Posted by napo_p2p
Consider
PHP Code:
something = (a > b) ? a : b
If the condition before the ? is true, then 'a' is assigned to 'something', otherwise 'b' is assigned.
So in this case, xAndrewx's expression is pretty much the equivalent to:
PHP Code:
if (clientr.mud_nation == null) {
clientr.mud_nation = "Neutral";
}
else {
clientr.mud_nation = clientr.mud_nation;
}
(You can see that this isn't the best situation to use a ternary operation because there is no need to set clientr.mud_nation to itself).
EDIT: Ziro beat me to it, but hopefully now you get the point :P.
|
Bah, way to steal points from me by explaining everything.
