Table of Content:
- If
- Operators
- Comparison Operators
- Else
- Switching to something else
- You spin me round...
- while
- for
- The cheat sheet
- if.. elseif.. else
- switch
- while
- do.. while
- for
In this article for PHP beginners, Allan takes you through the language’s control structures and constructs. These are the building blocks of a scripting language and allow it to make ‘decisions’ or repeat irms of code, unlike HTML which just renders top to bottom. After reading this, and attaching the supplied cheat sheet to your computer monitor, you’ll have the fundamental building blocks of the language at your command.
Allan comes from Cape Town, South Africa. He has been implicated in writing for several WROX, glasshaus, Wiley and Apress publications, generally in the 'cool stuff that PHP can do' sections.
You can catch up with him at his website http://www.mediafrenzy.co.za.