In this course, you will learn :
- This introductory course aims to change that by teaching you PHP in a series of clear, focused, and simple lessons. Instructor Joe Casabona introduces the language's features after briefly explaining what PHP is.
- In a series of hands-on exercises, Joe covers control structures, variables, arguments, and person class. He then moves on to more advanced topics such as try/catch statements, resolving differences between PHP versions, and form validation.
- After completing this course, you will have the knowledge and skills required to begin developing and maintaining interactive websites in PHP.
1. The Basics
- How PHP works
- Printing on the screen
- Using variables
- Single vs. double quotes
- What are arrays and how do they work?
- Defining arrays
2. Control Structures
- Boolean operators and the truth (update for PHP 8.0)
- Logical operators
- Creating if/else statements
- Ternary operations
- Switch statements
- Match expression
3. Math in PHP
- Arithmetic operators
- Figuring out even/odd with modulus
- Incrementing and decrementing variables
- What are loops?
- Do/while loops
- For loops
- Working through arrays with foreach loops
5. Functions and Objects
- What are functions?
- Using built-in functions
- Writing custom functions
- Union typing variables
- Optional or named arguments
- Anonymous functions
- What are objects and classes?
- Defining a simple person class (update for PHP 8.0)
- Using the person class
6. Including External Files
- Organizing your code
- Using include and require
- include_once and require_once
7. Troubleshooting Your Code
- Common debugging tools in PHP
- Types of PHP errors
- Why is my page blank?
- Common parse errors
- Common PHP errors
- Try/catch statements (update for PHP 8.0)
- Breaking changes moving from 7.x to 8.0
8. Processing Forms
- GET vs. POST
- Handling basic form elements
- Handing multiple-choice elements
- Form validation: Making sure required fields are filled in
- Form validation: Appropriate input
- Form validation: Sanitizing input
- Sending the form data in an email