| Previous | Home | Next |
strcmp()
The strcmp() function compares two strings. This function returns:
- 0 – if the two strings are equal
- <0 – if string1 is less than string2
- >0 – if string1 is greater than string2
strcmp("string1","string2");
Example:
<?php
echo strcmp("Gud Morning!","Gud Morning!!!");
?>
Output:
| Previous | Home | Next |