The example in this article describes a simple method for php to determine whether two strings are equal. Share it with everyone for your reference. The specific implementation method is as follows:
<?php function strcomp($str1,$str2){ if($str1 == $str2){ return TRUE; }else{ return FALSE; } } echo strcomp("First string","Second string"); //Returns FALSE echo strcomp("A string","A string"); //Returns TRUE ?>
I hope this article will be helpful to everyone’s PHP programming design.