Learn PHP

PHP is a widely used server-side programming language that’s become increasingly fast and powerful over the years. PHP works well with HTML and databases, making it a great language for anyone interested in building dynamic web applications.

Introduction to PHP

LESSON 1

Learn why PHP was created and what it is used for in today’s web development environment. See samples of PHP in action!

Exercises

  1. History of PHP

  2. How is PHP used in HTML?

  3. How is PHP Executed?

  4. PHP Comments

  5. Todo: Learn PHP

PHP Strings and Variables

LESSON 2

Learn about PHP Strings and Variables

Exercises

  1. Strings

  2. Escape Sequences

  3. String Concatenation

  4. Variables

  5. Creating Variables

  6. Using Variables

  7. Variable Parsing

  8. Variable Reassignment

  9. Concatenating Assignment Operator

  10. Assign by Reference

PHP Numbers

LESSON 3

Learn about the PHP number data types and arithmetic operators.

Exercises

  1. Numbers

  2. Addition and Subtraction

  3. Using Number Variables

  4. Multiplication and Division

  5. Exponentiation

  6. Modulo

  7. Order of Operations

  8. Mathematical Assignment Operators

Introduction to PHP Functions

LESSON 4

Learn how to create functions, reusable blocks of code, in PHP.

Exercises

  1. Introduction

  2. Defining Functions

  3. Invoking Functions

  4. Return Statements

  5. More on Return Statements

  6. Return Values

  7. Returning NULL

  8. Parameters

  9. Multiple Parameters

  10. Default Parameters

  11. Pass By Reference

  12. Variable Scope

Intro to Built-in PHP Functions

LESSON 5

Learn how to use, find, and understand functions that come built into the PHP

Exercises

  1. Introduction

  2. Working with Variables

  3. String Functions

  4. Working with Substrings

  5. Number Functions

  6. Generating Random Numbers

  7. Documentation

  8. Finding Functions

Ordered Arrays

LESSON 6

Learn about storing data in ordered lists with the PHP ordered arrays data structure.

Exercises

  1. Introduction

  2. Creating Arrays with array()

  3. Creating Arrays with Short Syntax

  4. Printing Arrays

  5. Accessing an Element

  6. Adding and Changing Elements

  7. More Array Methods: Pushing and Popping

  8. Shifting and Unshifting

  9. Nested Arrays

Associative Arrays

LESSON 7

Learn how to create and use PHP associative arrays.

Exercises

  1. Introduction

  2. Associative Arrays

  3. Printing Associative Arrays

  4. Accessing and Adding Elements

  5. Changing and Removing Elements

  6. Numerical Keys

  7. Joining Arrays

  8. Assign by Value or by Reference


Function Reference

Math Functions