These values are compared using dictionary order : Comparison Operators « Operator « PHP






These values are compared using dictionary order

 
if ('6 p' < '55 c') {
    print '"6 p" is less than than the string "55 c".';
} else {
    print '"6 p" is not less than the string "55 c".';
}
  
  








Related examples in the same category

1.Comparison Operators
2.Comparing numbers and strings
3.Loose Comparison Operators
4.Using Comparison Operators in if Statements
5.The Ternary Operator
6.The equality operator
7.These values are compared using numeric order
8.Equality Operators summary table
9.Equality Operators in action