Learn PHP

If you want to be a web developer, you need to learn PHP. Read these free tutorials to master this powerful and popular scripting language.

Getting started with PHP

  • How to Build a Simple REST API in PHP

    How to Build a Simple REST API in PHP

    Sajal Soni
  • How to Use Sessions and Session Variables in PHP

    How to Use Sessions and Session Variables in PHP

    Sajal Soni
  • How to Upload a File in PHP (With an Example)

    How to Upload a File in PHP (With an Example)

    Sajal Soni
  • All PHP content:

    1. How to Increase max_execution_time in PHP

      How to Increase max_execution_time in PHP

      Tutorial Beginner

      In this quick article, we’ll explore the different options that allow you to increase the maximum number of seconds a script is allowed to run before it’s...

    2. How to Implement Email Verification for New Members

      How to Implement Email Verification for New Members

      Tutorial Intermediate

      Have you ever created an account with a website and been required to check your email and click a verification link sent by the company in order to activate...

    3. Anonymous and Arrow Functions in PHP

      Anonymous and Arrow Functions in PHP

      Tutorial Intermediate

      This tutorial will teach you about the features and uses of anonymous functions in PHP. You'll also learn about the newer arrow function syntax in PHP.

    4. How to Include and Require Files and Templates in WordPress

      How to Include and Require Files and Templates in WordPress

      Tutorial Beginner

      In the WordPress world, one of the most common points of confusion is the proper way to include external files. PHP offers four ways to do this. In this...

    5. How to Work With Regular Expressions in PHP

      How to Work With Regular Expressions in PHP

      Tutorial Beginner

      In this article, we’ll look at the PHP functions that allow you to use regular expressions to perform search and replace operations on strings.

    6. How to Use Base64 Encoding in PHP

      How to Use Base64 Encoding in PHP

      Tutorial Beginner

      In this quick article, we’ll discuss the basics of base64 encoding in the context of PHP. Basically, we’ll see how to use PHP functions to transform data...

    7. Get the First and Last Elements of an Array in PHP

      Get the First and Last Elements of an Array in PHP

      Tutorial Beginner

      In this tutorial, you will learn about four different PHP functions to quickly get the first and last elements of an array.

    8. How to Use the array_map Function in PHP With Examples

      How to Use the array_map Function in PHP With Examples

      Tutorial Beginner

      In this quick article, we’ll discuss the array_map function in PHP. Basically, we’ll go through the syntax of the array_map function and demonstrate how to...

    9. Create a Contact Form in PHP

      Create a Contact Form in PHP

      Tutorial Beginner

      This tutorial will teach you how to create your own basic contact form in PHP. You'll also learn how to validate and sanitize user input and email the...

    10. Search and Replace Strings With Regular Expressions in PHP

      Search and Replace Strings With Regular Expressions in PHP

      Tutorial Intermediate

      In this tutorial, you'll learn how to search and replace strings with regular expressions in PHP.

    11. PHP Superglobals Explained—With Cheatsheet

      PHP Superglobals Explained—With Cheatsheet

      Tutorial Beginner

      In this post, you'll get a cheatsheet quick reference to all the PHP superglobal variables available in PHP.

    12. How to Replace Strings in PHP

      How to Replace Strings in PHP

      Tutorial Beginner

      This tutorial will teach you how to replace strings in PHP. We will cover a bunch of cases like replacing a single substring or multiple substrings. We will...