Comparing strings case-insensitively : strcasecmp « String « PHP





Comparing strings case-insensitively

 
<?
if (strcasecmp('[email protected]', '[email protected]') == 0) {
    print "Welcome back, Mr..";
}
?>
  
  

Related examples in the same category

1.strcasecmp() function operates like strcmp(), except that its comparison is case insensitive.
2.Using strcasecmp to compare two strings
3.int strcasecmp ( string str1, string str2 ) is a case-insensitive version of the strcmp( ) .