O'Reilly logo

Sams Teach Yourself PHP, MySQL by Julie C. Meloni

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 6. Flow Control Functions in PHP

The scripts created in the previous chapter flow only in a single direction—forward. That is, the same statements execute in the same order every time a script is run. This does not allow for much flexibility because any sort of dynamic programming will at the very least need to have a loop or two, not to mention the ability to check for the validity of certain conditions before proceeding onward.

You will now learn about the programming structures that enable your scripts to adapt to circumstances. In this chapter, you will learn

  • How to use the if statement to execute code if a test expression evaluates to true

  • How to execute alternative blocks of code when the test expression of an if statement evaluates ...

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