Official Killer Media Corporate Website (Click to View)

Archive for the ‘Strings’ Category

PHP Tip: Using the Ternary Operator

Sunday, August 12th, 2007

A ternary operator is an operator that takes three arguments in total. Two actual arguments and one result. The arguments and result can be of different types.
Many programming languages that use C-like syntax feature a ternary operator, (?:); unqualified, “ternary operator” usually refers to this. The (?:) operator is used as a shorthand replacement for [...]