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.

 

Want to learn PHP 7?

Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!

If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Opening and closing code islands >>

Previous chapter: Brief introduction to variable types

Jump to:

 

Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.