or if you only want to return 1 and 0 instead of just "true" and "false":return $status ? 1 : 0;
I know this is a bit of a dead horse but someone should have pointed out that your code above is not equivalent to the original. Consider $status = "a string" for instance. The original would return zero because that "a string" == 0 is true. Yours would return 1 because "a string" is also true.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: variable set to 0 ? 0 : 1
by sauoq
in thread variable set to 0 ? 0 : 1
by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |