JavaScript Editor Javascript source editor     Web programming 



Team LiB
Previous Section Next Section

Summary

This chapter introduced you to the concepts of arrays and objects. First, you learned about a few different types of arrays and how they are created and referenced. These array types were the numerically indexed array, associative array, and multidimensional array. Additionally, you saw examples of some of the numerous array-related functions already built into PHP. These functions can be used to manipulate and modify existing arrays, sometimes even creating entirely new ones.

In the second part of the chapter, you were given a foundation for working with object-oriented code. In no way does this content cover all the aspects of object-oriented programminguniversities teach entire series of classes (no pun intended) devoted to this topic, so you can imagine that these pages are a little light. However, you did learn to create classes and instantiate objects from them. You learned how to create and access the properties and methods of a class, how to build new classes, and how to inherit features from parent classes. That's not too shabby!

Q&A

Q

Do I have to understand object-oriented programming to become a good PHP programmer, or even to finish this book?

A

Not at all. In fact, the projects in this book are procedural, and do not contain object-oriented (OO) programming! Object-oriented programming is an organizational approach that is intended to improve the reusability and extensibility of the code that makes up a given application. You might not know enough about your project in the beginning stages of development to fully plan for an object-oriented design. When it is completeor, at least, approaching a solid stateyou might start to see areas in which an object-oriented approach can be taken, and you might start to combine your code into classes, properties, and methods. But for the most part, simple scripts performing particular duties are not written in object-oriented fashion unless it is your background and comes naturally to you.

    Team LiB
    Previous Section Next Section


    JavaScript Editor Javascript source editor     Web programming

    
    R7