Anthony Ritter wrote:
if(strcasecmp($first_name,$second_name)) {
echo "words are equal";
}
else
{
echo "words are not equal.";
}
?>
if(strcasecmp($first_name,$second_name)===0)
{ echo 'words are equal'; }
else
{ echo 'words are not equal'; }
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o
..
In strcasecmp() - this comparison will return 0 - interpreted by PHP as
FALSE - eventhough words are _equal_ so what will execute is "words are not
equal".
whereas if the negation symbol of ! is inserted as in:
...
...
to read if the comparsion which is returned is n
2 matches
Mail list logo