October 2005
Intermediate to advanced
372 pages
11h 35m
English
strcasecmp()
int strcasecmp ( stringstr1, stringstr2)
This is a case-insensitive version of the strcmp()
.
$result = strcasecmp("Hello", "hello");That will return 0, because PHP will ignore the case difference. Using strcmp() instead would have returned -1: "Hello" would come before "hello".