Code blocks
One key thing to note is that PHP makes extensive use of code blocks - chunks of PHP code that are separate from the rest of the script. As you read the following sections in this chapter, you will notice that PHP uses braces, { and }, to open and close code blocks - I will be explaining it more when you see it.
Next chapter: Opening and closing code islands >>
Previous chapter: Brief introduction to variable types
Jump to: Introducing PHP History Background Early versions of PHP Current release Upgrading from PHP 3 Upgrading from PHP 4 The creators of PHP The Zend Relationship Advantages of PHP The HTML relationship Interpreting vs. Compiling Output Control Performance Competing Languages When to use PHP When not to use PHP Selling PHP to your boss Extending PHP PEAR Running PHP scripts How PHP is written Whitespace Escape sequences Heredoc Brief introduction to variable types Code blocks Opening and closing code islands Comments Conditional statements Case switching Loops Infinite loops Special loop keywords Loops within loops Mixed-mode processing Including other files Abnormal script termination Editing your PHP configuration Summary Exercises Further reading Next chapter
Home: Table of Contents
Follow us on Identi.ca or Twitter