PHP Crash Course Cover

PHP Crash Course

The Complete, Modern, Hands-On Guide
by Matt Smith
December 2024, 728 pp
ISBN-13: 
9781718502529

Download Chapter 7: Simple Arrays

Look Inside!

PHP Crash Course back cover
PHP Crash Course pages 28-29PHP Crash Course pages 126-127PHP Crash Course pages 302-303

Tired of cobbling together PHP solutions from scattered online tutorials? Frustrated by outdated PHP practices that leave your code vulnerable and hard to maintain? Whether you’re building your first dynamic website or modernizing legacy systems, PHP Crash Course gives you a complete, practical foundation for writing professional web applications.

In this comprehensive, example-driven guide, you’ll learn how to:

  • Write clean, maintainable PHP code using modern language features and best practices
  • Build secure web applications that protect against common vulnerabilities
  • Master database integration using PDO and object-relational mappings (ORMs)
  • Implement professional features like shopping carts and user authentication
  • Structure applications using object-oriented programming and model-view-controller (MVC) patterns
  • Leverage powerful tools like Composer and Twig to accelerate development

Starting with PHP fundamentals, you’ll progress through six carefully crafted sections covering essential patterns, security best practices, database integration, and advanced concepts like object-oriented programming. Each chapter builds on real-world examples, giving you the skills to solve common development challenges.

Whether you’re a complete beginner or an experienced developer looking to modernize your PHP skills, PHP Crash Course gives you everything you need to build professional, dynamic websites with confidence.

Includes setup instructions for Windows, macOS, and Linux, and configuration details for Replit, the free online development environment.

Author Bio 

Dr. Matt Smith is a senior lecturer in computing at Technological University Dublin, specializing in web applications and immersive technologies. With over 30 years of teaching experience and degrees from the University of Huddersfield (BA), the University of Aberdeen (MSc), and the Open University (PhD), he has been at the forefront of PHP-based web development education since the mid-2000s.

Table of contents 

Acknowledgments 
Introduction
PART I: LANGUAGE FUNDAMENTALS
Chapter 1: PHP Program Basics
Chapter 2: Data Types
Chapter 3: Strings and String Functions
Chapter 4: Making Choices with Conditionals
Chapter 5: Creating Reusable Code with Functions
PART II: WORKING WITH DATA
Chapter 6: Repeating Actions with Loops
Chapter 7: Simple Arrays
Chapter 8: Sophisticated Arrays
Chapter 9: Working with Files and Directories
PART III: PROGRAMMING WEB APPLICATIONS
Chapter 10: Client-Server Communication and Web Development Basics
Chapter 11: Creating and Processing Web Forms 
Chapter 12: Validating Form Data
Chapter 13: Organizing a Web Application
PART IV: STORING USER DATA WITH BROWSER SESSIONS
Chapter 14: Working with Sessions
Chapter 15: Implementing a Shopping Cart 
Chapter 16: Authentication and Authorization
PART V: OBJECT-ORIENTED PHP
Chapter 17: Introduction to Object-Oriented Programming
Chapter 18: Declaring Classes and Creating Objects
Chapter 19: Inheritance
Chapter 20: Managing Classes and Namespaces with Composer
Chapter 21: Efficient Template Design with Twig
Chapter 22: Structuring an Object-Oriented Web Application
Chapter 23: Error Handling with Exceptions
Chapter 24: Logging Events, Messages, and Transactions
Chapter 25: Static Methods, Properties, and Enumerations 
Chapter 26: Abstract Methods, Interfaces, and Traits
PART VI: DATABASE-DRIVEN APPLICATION DEVELOPMENT
Chapter 27: Introduction to Databases
Chapter 28: Database Programming with the PDO Library 
Chapter 29: Programming CRUD Operations
Chapter 30: ORM Libraries and Database Security
Chapter 31: Working with Dates and Times 
Appendix A: Installing PHP
Appendix B: Database Setup 
Appendix C: Replit Configuration 

View the Copyright page
View the detailed Table of Contents
View the Index