PHP strnatcmp() FunctionThe strnatcmp() function in-built string function of PHP. It is used to compare string by using a natural algorithm. Syntax:
This function strnatcmp():
Note: It is case sensitive.Example 1Output: By Using strnatcmp()Function:-1 Example 2Output: By Using strnatcmp()Function:1 Example 3Output: Standard string comparisonnArray ( [0] => PHP1 [1] => PHP10 [2] => PHP12 [3] => PHP2 ) nNatural order string comparisonnArray ( [0] => PHP1 [1] => PHP2 [2] => PHP10 [3] => PHP12 ) See Also:
Reference: http://php.net/manual/en/function.strncmp.php Next TopicPHP String |
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