int strcoll ( string $str1 , string $str2 )
它用于根据区域设置比较两个字符串
Sr.No | 参数 & 描述 |
---|---|
1 |
str1 它指定要比较的第一个字符串 链接:https://www.learnfk.comhttps://www.learnfk.com/php/php-function-strcoll.html 来源:LearnFk无涯教程网 |
2 |
str2 它指定要比较的第二个字符串 |
它返回字符串函数
<?php echo "If this function returns 0, the two strings are equal."; echo "<br> The result is "; setlocale (LC_COLLATE, 'NL'); echo strcoll("Hello World!","Hello World!"); ?>
这将产生以下输出-
If this function returns 0, the two strings are equal. The result is 0
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)