Các dòng mới và các tab đã được giải thích bằng PHP thay vì được thông qua như là ký tự chữ JavaScript. Điều này không ảnh hưởng dự định của chúng tôi. Chúng tôi muốn để giải thích các biểu tượng này là dòng mới và các tab, không PHP. Đoạn code dưới đây sửa chữa vấn đề này: | throughout a user s visit from page to page of the website. Finally we d use the information to generate a check out page to verify the order. When the customer is ready to order we can add their name address and possibly credit card information to the user s table and generate the order. In this scenario we would probably have to generate a random temporary userid and would most probably use the TableDrop method after the order is generated to free up system resources. It is extremely useful to use the require function to incorporate your class descriptions and commonly used instance declarations in your scripts. As stated before the ability to use your classes in many different scripts is one of the key reasons for creating them. Summary Object-oriented programming allows programmers to refer to related variables and functions as a single entity called an object or instance. It incorporates three basic principles abstraction encapsulation inheritance A class is a template that defines the variables and functions of an object. Class variables are referred to as properties. Class functions are referred to as methods. Class methods and properties are referenced using the - operator. Creating an instance is called instantiation and is accomplished using the new statement. Constructors are special methods that are executed whenever an instance is created. Constructors are created by giving the method the same name as the class. A class may inherit properties and methods from a previously declared class by using the extends argument with the new statement. This newly created class is known as the child class. The original class is known as the parent class. 10 String Manipulation and Regular Expressions In many applications you will need to do some kind of manipulation or parsing of strings. Whether you are attempting to validate user data or extract data from text files you need to know how to handle strings. In this chapter we will take a look at some of PHP s string