Thanks guys 
Now I simply want to know, what's the usage of "?"...
Like 3 ? 2 = ?
Just wanted to learn that as I see it in several scripts.
|
It's a conditional statement.
PHP Code:
variable = (condition)?x:y;
is equivalent to
PHP Code:
if (condtion)
variable = x;
else
variable = y;
Some people think they're pretty ugly. I only use them if it's a small statement otherwise I stretch it out for viewing purposes. Also makes debugging that much easier.