PHP conditional syntax: inequality

Home -> Programming -> Web -> PHP

9521 views

From the computer of: qmchenry (339 recipes)
Created: Dec 27, 2003     Updated: Jun 19, 2006


0 comments:
View all comments

Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL









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

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

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  PHP syntax: for loop basics
  PHP conditional syntax: less than
  PHP comparison syntax: equality
  PHP conditional syntax: greater than
  PHP conditional syntax: using switch and case statements
  Solve PHP error: Cannot modify header information - headers already sent
  PHP: Rename or move a file on the server
  PHP syntax: comments
  PHP syntax: iterate over an associative array
  PHP syntax: create an associative array

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.