PHP Compare String – String Function

 
    <?
$string_1 = "00008";
$string_2 = "007";
$string_3 = "00008-OK";if ($string_2 < $string_1){
  print("$string_2 is less than $string_1<br />");
}if ($string_3 < $string_2){
  print("$string_3 is less than $string_2<br />");
}
if ($string_1 < $string_3){
  print("$string_1 is less than $string_3<br />");
}
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.