Chapter 3. Code Organization and Reuse
At some point in coding, you will want to reuse some code that you have already written. PHP provides a number of ways to organize and reuse code, which we have grouped into three broad categories. These will be covered over the next two chapters. In this chapter, we will discuss functions, the most straightforward way to reuse code. We will then look at putting code into separate reusable files, which can then be referenced and used from other scripts.
By the end of this chapter, we will see how PHP lets us