Opposite if statement in php
i'm new at php and i'm practicing with the basics of php
now i want to know what the opposite is of == when using the if statem开发者_StackOverflow社区ent.
I hope someone can help
Thanks.
It's !=
is that all you wanted to ask?
Research a little, before you ask a question. Trust me, it won't hurt. You will feel joy when you find out the facts by yourself.
The operator for "not equal to" in PHP is !=
I might also suggest you check out PHP.net. They have a ton of useful information on the language: http://www.php.net/manual/en/getting-started.php
!=
- not equal
<>
- different
The exact opposite is !== or != (see this article for difference).
From http://www.php.net/manual/en/language.operators.comparison.php the answer you are probably looking for is $a != $b , be sure to check out the operaters syntax in the php manual to learn more about what you can do.
精彩评论