在PHP中,可以使用双等号(==)或三个等号(===)来判断两个字符串是否相等。
$str1 = "Hello";
$str2 = "hello";
if ($str1 == $str2) {
echo "Strings are equal";
} else {
echo "Strings are not equal";
}
$str1 = "Hello";
$str2 = "hello";
if ($str1 === $str2) {
echo "Strings are equal";
} else {
echo "Strings are not equal";
}