PHP strnatcasecmp() FunctionThe strnatcasecmp() function is in-built function of PHP. It is used to compare two strings using a "natural order" algorithm. This function accepts two string as parameter and return integer value. It is similar to strnatcmp() function. Note: This function strnatcasecmp() is case-insensitive.Syntax:
Example 1 Output: Your string is: Hello world! Hello world! By using 'strnatcasecmp()' function: 0 Example 2 Output: Your string is: 2Hello world!10Hello WORLD! By using 'strnatcasecmp()' function: -1 Example 3 Output: Your string is: 10Hello world!2Hello WORLD! By using 'strnatcasecmp()' function: 1 See Also
Reference: http://php.net/manual/en/function.strnatcasecmp.php Next TopicPHP String Functions |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India