简单的条件判断语句练习,判断两个字符串是否完全一样
<?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 ?>
简单的条件判断语句练习,判断两个字符串是否完全一样
<?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 ?>