The PHP Ternary Operator January 28, 2014 Get link Facebook X Pinterest Email Other Apps PHP Ternary Operator :- It is called the ternary operator because it takes three operands - a condition, a result for true, and a result for false. Example :- <?php $agestr = ($age < 16) ? 'child' : 'adult'; ?> Comments
Comments
Post a Comment