Add new comment

Want to support HowtoForge? Become a subscriber!
Submitted by haroon (registered user) on Mon, 2007-01-22 10:12.

yes it is very useful operator when you want to match the data types as well as values e.g

<?php

$value1 = 3;

$value2 = "3";

if($value1 === $value2)

echo "matched";

else

echo "not matched";

?>

You will get the NOT MATCHED output because value1 has 3 as integer value on the other hand 3 is string in value2 variable. So whenever you need to match data type as well as value you should use === operator.

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.