Web page design - 86Part IPHP: The BasicsSo far, all we ve formally

86Part IPHP: The BasicsSo far, all we ve formally covered are the TRUEand FALSEconstants and how to combinethem to make other true-or-false values. Now we ll move on to operators that actually let youmake meaningful Boolean tests. Comparison operatorsTable 6-2 shows the comparison operators, which can be used for either numbers or strings(although you should see the cautionary sidebar entitled Comparing Things That Are NotIntegers ). Table 6-2: Comparison OperatorsOperatorNameBehavior==EqualTrue if its arguments are equal to each other, falseotherwise!=Not equalFalse if its arguments are equal to each other, trueotherwiseGreater thanTrue if the left-hand argument is greater than itsright-hand argument, but false otherwise<=Less than or equal toTrue if the left-hand argument is less than its right- hand argument or equal to it, but false otherwise>=Greater than or equal toTrue if the left-hand argument is greater than its right- hand argument or equal to it, but false otherwise===IdenticalTrue if its arguments are equal to each other and ofthe same type, but false otherwise As an example, here are some variable assignments, followed by a compound test that isalways true: $three = 3; $four = 4; $my_pi = 3.14159; if (($three == $three) and($four === $four) and($three != $four) and($three < $four) and($three <= $four) and($four >= $three) and($three <= $three) and($my_pi > $three) and($my_pi <= $four)) print( My faith in mathematics is restored!
); elseprint( Sure you typed that right?
);
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Leave a Reply