[Solved] Check if a number is negative in PHP [duplicate]


You have to compare the three condition with AND (in php &&) so if ALL of three numbers are > 0 the if condition is verified.

if($qt1 >= 0 && $qt2 >= 0 && $qt3 >= 0){
    //your code if all three numbers are >= 0
}

solved Check if a number is negative in PHP [duplicate]