In This Chapter
Creating functions to manage your code's complexity
Enhancing your code by using functions
Working with variable scope
Getting familiar with session variables
Incorporating session variables into your code
PHP programs are used to solve interesting problems, which can get quite complex. In this chapter, you explore ways to manage this complexity. You discover how to build functions to encapsulate your code. You also learn how to use session variables to make your programs keep track of their values, even when the program is called many times.
It won't take long before your code starts to get complex. Functions are used to manage this complexity. As an example, take a look at Figure 5-1.
Before I show you how to improve ...