Compare two strings using a "natural" algorithm (case-sensitive) in PHP
Description
The following code shows how to compare two strings using a "natural" algorithm (case-sensitive).
Example
// ww w .ja v a2s.c o m
<?php
echo strnatcmp("2Hello world!","10Hello world!");
echo "<br>";
echo strnatcmp("10Hello world!","2Hello world!");
?>
The code above generates the following result.