如何在PHP中使用If语句组合两个参数

如何在PHP中使用If语句组合两个参数,php,if-statement,default-arguments,Php,If Statement,Default Arguments,我真的需要你的帮助。我想知道如何使用两个大于(>)和小于(的参数使用&&: if($value1 < 78 && $value1 > 7){ print"Yes, the answer is above 7 but below 78"; } else { print"that's not correct"; } if($value17){ 打印“是,答案高于7但低于78”; } 否则{ 打印“那不正确”; } 请参阅:和如其他人所述,使用PHP

我真的需要你的帮助。我想知道如何使用两个大于(>)和小于(的参数使用
&&

if($value1 < 78 && $value1 > 7){
    print"Yes, the answer is above 7 but below 78";
} 
else {
    print"that's not correct";
}
if($value1<78&&$value1>7){
打印“是,答案高于7但低于78”;
} 
否则{
打印“那不正确”;
}

请参阅:和

如其他人所述,使用PHPs
&
(和)组合逻辑

作为这里列出的
if/else
方法的替代方法,您可以使用PHP的

大概是这样的:

echo($value17)
“是的,答案在7以上,但在78以下。”
:“那不对”;

可能重复感谢John,成功了!!很抱歉我现在不能投票,分数不够。
if($value1 < 78 && $value1 > 7){
    print"Yes, the answer is above 7 but below 78";
} 
else {
    print"that's not correct";
}
<?php
$value1="7";
if($value1<78 && $value1>7)
{
    print "Yes, the answer is above 7 but below 78";
} 
else 
{
    print"that's not correct";
}
?>