1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Comparison Operators

By

Definition: A comparison operator compares one value to another. It can compare it in four different ways:

== - Equal to (also sometimes written as just = )
!= - Not equal to
> - Greater than (meaning the value on the left is larger then the one on the right)
< - Less than (meaning the value on the left is smaller than the one on the right)

Examples:

Some examples of comparison operators:
 10 > 8 
 10 < 12 
 X = 5 
 y != 6 
Related Video
Basic PHP Syntax
Using PHP With HTML
  1. About.com
  2. Technology
  3. PHP / MySQL
  4. Programing Glossary
  5. Comparison Operator - PHP Comparison - PHP Operator

©2014 About.com. All rights reserved.