Comparing numbers and strings : Comparison Operators « Operator « PHP
- PHP
- Operator
- Comparison Operators
Comparing numbers and strings
<?
// These values are compared using dictionary order
if ("x54321" > "x5678") {
print 'The string "x54321" is greater than the string "x5678".';
} else {
print 'The string "x54321" is not greater than the string "x5678".';
}
Related examples in the same category