3. Control Statements

Overview

By the end of this chapter, you will be able to describe Boolean expressions; leverage logical operators to compose Boolean expressions; choose the right comparison operators within a control statement; describe branching and different looping techniques in PHP; apply branching with ifelse, switch case, break, and continue statements; differentiate between bounded and unbounded loops; implement loops such as while, dowhile, for, and foreach; and write a PHP script to create a movie listing application.

Introduction

Since PHP is a dynamically typed language where types are associated with data instead of variables, it's essential to understand the role that types play in the data operations landscape. In ...

Get The PHP Workshop 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.