Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
PHP and ? circuitjump
What does the ? (question mark) do in PHP?
Or more to the point.
X = (!X ? 2 : X);
It's supposed to mean I think
if X is not true then use X, else if it is true then use 2
$first ? $second : $third
If the value of the first subexpression is TRUE (non-zero), then the second subexpression is evaluated, and that is the result of the conditional expression. Otherwise, the third subexpression is evaluated, and that is the value.
...] (find: ternary) php.net
You know I could not find this information in any of my PHP books. And I got three of them.
Thanks for the answer