PHP5, like any good programming language, contains structures that allow for decision-making based on current data while the application is running. This is the essence of programming and application design, because the capability of an application to respond to changing inputs is what makes computers so powerful. Interestingly, these structures are quite simple and straightforward, yet yield an immense variety of capabilities when coupled with the blinding processing speed computers are capable of.
Decision-making code blocks in programming are called control-flow structures, or branching structures. They perform sets of basic instructions conditionally, based on values or expressions that may be constant or may be updated with each new go-round through the loop. They are all relatively simple in form, such as the if statement structure, but can be written in combination to create elaborate decision-making logic within your application.
In this chapter you'll practice stating the problem in plain language and write pseudo code reflecting the problem statement. You'll learn how Boolean logic works and use several PHP structures. The break statement and work with arrays and multidimensional arrays are also included.
