Php strcmp function example tutorial. Define and use the strcmp () function to compare two strings. This function returns: 0-if the two strings are equal, 0-if the string is smaller than the string 0-if the string is greater than the character definition and usage
The strcmp () function compares two strings.
This function returns:
0-if the two strings are equal
"0-if the string is smaller than the string
"0-if the string is greater than the string
Syntax
strcmp(string1,string2)
Parameter |
Description |
String1 |
Required. Comparison of the specified first string |
String2 |
Required. Specify the second string for comparison |
Note: The strcmp () function is binary secure and case sensitive. For example
Result: 0
Evaluate the strcmp () function to compare two strings. This function returns: 0-if the two strings are equal to 0-if the string is smaller than the string 0-if the string is greater than the character...