> thanks, another question is what does the ? means in this line?

>From the PHP manual:
Another conditional operator is the "?:" (or ternary) operator, which
operates as in C and many other languages.

(expr1) ? (expr2) : (expr3);

This expression evaluates to expr2 if expr1 evaluates to TRUE, and expr3 if
expr1 evaluates to FALSE.

So, this would print "yes":
print(true ? "yes" : "no");
And so would this:
true ? print("yes") : print("no");

And this would print "no":
print(false ? "yes" : "no");
And so would this:
false ? print("yes") : print("no");

Hope that's enough info.

/ franklin

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to