3 HOW TO WRITE PHP SCRIPTS

What this chapter covers:

  • Understanding how PHP is structured
  • Embedding PHP in a web page
  • Storing data in variables and arrays
  • Getting PHP to make decisions
  • Looping through repetitive tasks
  • Using functions for preset tasks
  • Displaying PHP output
  • Understanding PHP error messages

If you're the sort of person who runs screaming at the sight of code, this is probably going to be the scariest chapter in the book, but it's an important one—and I've tried to make it as user-friendly as possible. The reason for putting the rules of PHP in one chapter is to make it easier for you to dip into other parts of the book and use just the bits that you want. If there's anything you don't understand, you can come back to the relevant ...

Get PHP Solutions: Dynamic Web Design Made Easy now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.