Comparing strings case-insensitively : strcasecmp « String « PHP






Comparing strings case-insensitively

 
<?
if (strcasecmp('a@demo.com', 'a@demo.com') == 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( ) .