O'Reilly logo

PHP and MySQL by Example by Marko Gargenta, Ellie Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7Conditionals and Loops

Image

7.1 Control Structures, Blocks, and Compound Statements

Figure 7.1 shows a flow chart. A flow chart is defined as a pictorial representation of how to plan the stages of a project. It helps to visualize what decisions need to be made to accomplish a task. People control their lives by making decisions, and so do programs. In fact, acccording to computer science books, a good language allows you to control the flow of your program in three ways:

• Execute a sequence of statements.

• Based on a test, branch to an alternative sequence of statements.

• Repeat a sequence of statements until some ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required