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
 What is the % operator     -  
 operator int()     -  
 operator overloading     -  
 What is Operator Overloading? !!!     -  
 Sizeof Operator     -  
 Object without new Operator     -  
 stream operator     -  
 trinary operator     -  
 difference between the Boolean & operator and the &&     -  
 shift operator in java     -  

Topic Tags

PHP Basics