??? ?? ??;
PHP strnatcmp() ?? ???
??: ???? ???? ?? ?? ??
??: ??strnatcmp(string1,string2)
????:
???? | Description |
string1 | ??, ?? ??? ? ?? ??????. |
string2 | ??? ? ?? ???? ???? ???.? |
??: strnatcmp() ??? "??" ????? ???? ? ???? ?????. ??????? ?? 2? ?? 10?? ????. ??? ????? 10? ? ?? ??? 2?? ?? ??? 10? 2?? ????. ? ??? ????? ?????. ? ???? ??? 0? ?????. string1? string2?? ?? ??? ?? 0?? ???. string1? string2?? ??? ??? ?? 0?? ????.
PHP strnatcmp() ?? ?
<?php //使用自然算法來(lái)比較兩個(gè)字符串 echo strnatcmp("2hello world!","01hello world!"); echo "<br>"; echo strnatcmp("01hello world!","2hello world!"); ?>
???? ?? ?
??? ????? ??? "???? ??" ??? ?????
??:
1 -1