PHP conditional syntax: inequality

Posted December 27, 2003 by Quinn McHenry in PHP programming

To determine if two values are not equal, use the inequality operator:

if ($var1 != $var2)
echo "Nope... not the same";

 

About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.