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

Using the ? Operator

Tue Oct 28, 2008 3:26 pm

Code:
<html>
<head>
<title>Using the ? Operator</title>
</head>
<body>
<?php
$mood
= "sad";
$text = ( $mood=="happy" ) ? "a good mood" : "Not happy but $mood";
print
"$text";
?>
</body>
</html>




Post a reply
  Related Posts  to : Using the ? Operator
 operator int()     -  
 What is the % operator     -  
 Sizeof Operator     -  
 Object without new Operator     -  
 stream operator     -  
 trinary operator     -  
 operator overloading     -  
 What is Operator Overloading? !!!     -  
 shift operator in java     -  
 unary operator overloading     -  

Topic Tags

PHP Basics