strcmp(string1,string2)
它用于比较两个字符串
Sr.No | 参数 & 描述 |
---|---|
1 |
string1 它指定要比较的第一个字符串 |
2 |
string2 链接:https://www.learnfk.comhttps://www.learnfk.com/php/php-function-strcmp.html 来源:LearnFk无涯教程网 它指定要比较的第二个字符串 |
它返回字符串函数
尝试以下示例
<?php echo "If this function returns 0, the two strings are equal."; echo "<br> The result is "; echo strcmp("Hello world!","Hello world!"); ?>
这将产生以下输出-
If this function returns 0, the two strings are equal. The result is 0
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)
Tony Bai · Go语言第一课 -〔Tony Bai〕