View Single Post
  #20  
Old 12-18-2011, 12:22 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by khortez View Post
Oh, and whats the syntax for ?
?: is a ternary operator (meaning that it is an operator that takes 3 arguments). By itself, the question mark is not a valid operator.

e.g.
PHP Code:
temp.result SOME_CONDITION temp.temp.b
is equivalent to
PHP Code:
if (SOME_CONDITION) {
  
temp.result temp.a;
} else {
  
temp.result temp.b;

__________________
Reply With Quote