php multiple if conditions

前端 未结 5 1939
既然无缘
既然无缘 2021-01-29 11:16

when i try to filter all these parameters php only enters in the first if conditions, ignoring all others conditions.

if($t_red<0){
    $t_red=0;
}

else if($         


        
5条回答
  •  盖世英雄少女心
    2021-01-29 12:06

    $t_red=$t_red<0?0;$t_red;
    $t_red=$t_red>=256?255;$t_red;
    
    
    //are you sure you're modifying t_red here? and not t_green?
    $t_red=$t_green<0?0;$t_red;
    $t_red=$t_green>=256?255;$t_red;
    
    //are you sure you're modifying t_red here? and not t_blue?
    $t_red=$t_blue<0?0;$t_red;
    $t_red=$t_blue>=256?255;$t_red;
    

提交回复
热议问题