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

Equality Operators

Mon Oct 27, 2008 12:48 pm

Code:
<html>
<head>
   <title>Equality</title>
</head>
<body>
     <?php
          $a
= 1;
          
$b = "1";
   
          print(
"(\$a == \$b)" . (($a == $b) ? "True" : "False") . "<br />");
          print(
"(\$a != \$b)" . (($a != $b) ? "True" : "False") . "<br />");
          print(
"(\$a === \$b)" . (($a === $b) ? "True" : "False") . "<br />");
          print(
"(\$a !== \$b)" . (($a !== $b) ? "True" : "False") . "<br />");
     
?>
</body>
</html>




Post a reply
  Related Posts  to : Equality Operators
 Equality in java     -  
 String compare equality     -  
 PHP operators     -  
 difference between the >> and >>> operators     -  
 Using Assignment Operators     -  
 shortcut operators     -  
 Bitwise operators     -  
 using bit-wise operators in c++     -  
 C++ Increment Operators     -  
 bitwise operators usage in C++     -  

Topic Tags

PHP Basics