The trinary operator : Trinary Operator : Language Basics PHP Source Code


PHP Source Code » Language Basics » Trinary Operator »

 

The trinary operator



<?
$first_num =2;
$second_num = 1;

$max_num = $first_num > $second_num ? $first_num : $second_num;

echo($max_num);

?>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» Trinary Operator