CIST 2351 Chapter 8: PHP Programming Ch 8
Document Summary
How to use the equality and identity operators. The equality operators perform type coercion, which converts data from one type to another. The identity operators do not perform type coercion. If the two operands are of different types, the result is always false. How to code if statements with else clauses. You can nest an if statement within the if, else if, or else of another if statement. The conditional operator is the only ternary operator available from php, and it provided a compact way to code an if statement. The switch statement starts by evaluating the switch expression in the parentheses. After evaluating the expression, the switch statement transfers control to the case label that has the value that matches the value of the expression. Then, it executes the statements for that case. The while statement executes the block of statements within its braces as long as its conditional expression is true.