php strncmp () function syntax
Action: before comparison character string of n characters, case sensitive
Syntax: strncmp (string1, string2, length) linear motor brand
parameter:
parameter | description |
string1 | We must provide for the comparison of the first string. |
string2 | We must provide for the comparison of the second string. |
length | We must require the number of characters in each string comparisons used. |
Description: a strncmp () function compares two strings. strncmp () is binary safe and case sensitive. If the two strings are equal, the output 0, if string1 greater than string2, the output value is greater than 0, if the value is less than string1 string2, the output is less than 0.
php strncmp () function examples
<?php echo strncmp("helloworld","Helloworld",6); ?>