"Carl Furst" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hey all,
>
> Question about ternary operators. You can't really use functions INSIDE
> ternary operators, right? They can only be tokens and operators?

You *can* use functions inside of ternary operators, as long as they return 
a value.  The ternary operator acts like a r-value, like a "number".
$fabulous = 1;
$fabulous = FunctionCall(x,y,z)? 1 : 2;
$fabulous = $checkValue? FunctionCall1(x) : FunctionCall2(y);

DanB

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to