Chapter 15 Making Questions
15.1 Introduction
All you have learned so far is the sequence control structure, where statements are executed sequentially, in the same order in which they appear in the script. However, in serious PHP programming, rarely do you want the statements to be executed sequentially. Many times you want a block of statements to be executed in one situation and an entirely different block of statements to be executed in another situation.
15.2 What is a Boolean Expression?
Let's say that variable $x contains a value of 5. This means that if you ask the question “is $x greater than 2?” the answer is obviously “Yes”. For a computer, these questions are called Boolean expressions. For example, if you write $x > 2, this is a ...
Get PHP and Algorithmic Thinking for the Complete Beginner now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.