frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

PHP Operators 3

PHP Operators

Assignment operator: x %= y

<!DOCTYPE html>
<html>
<body>


<?php
$x = 15;
$x %= 4;


echo $x;
?>  


</body>
</html>


Comparison operator: Equal (==)

<!DOCTYPE html>
<html>
<body>


<?php
$x = 100;  
$y = "100";


var_dump($x == $y); // returns true because values are equal
?>  


</body>
</html>


Comparison operator: Identical (===)

<!DOCTYPE html>
<html>
<body>


<?php
$x = 100;  
$y = "100";


var_dump($x === $y); // returns false because types are not equal
?>  


</body>
</html>

Comparison operator: Not equal (!=)

<!DOCTYPE html>
<html>
<body>


<?php
$x = 100;  
$y = "100";


var_dump($x != $y); // returns false because values are equal
?>  


</body>
</html>

Comparison operator: Not equal (<>)

<!DOCTYPE html>
<html>
<body>


<?php
$x = 100;  
$y = "100";


var_dump($x <> $y); // returns false because values are equal
?>  


</body>
</html>


Tagged:
Sign In or Register to comment.

Developer

| make vanilla clean and light
@ 2016 Your Sitename, All rights reserved. Material Design is a design language developed by Google. Material Design makes more liberal use of grid-based layouts and responsive animations and transitions.
Powered by VanillaForums, Designed by ThemeSteam

Contact us

info@example.com
support@example.com
(800) 3032120

Get In Touch