Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

trinary operator

Mon Oct 27, 2008 5:59 pm

Code:

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

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

echo(
$max_num);

?>




Post a reply
  Related Posts  to : trinary operator
 Using the ? Operator     -  
 What is the % operator     -  
 operator int()     -  
 stream operator     -  
 operator overloading     -  
 What is Operator Overloading? !!!     -  
 Sizeof Operator     -  
 Object without new Operator     -  
 Operator Precedence table     -  
 working of bitwise ~ operator     -  

Topic Tags

PHP Basics