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 tutorials:

    1. Parse XML to an Array in PHP With SimpleXML

      Parse XML to an Array in PHP With SimpleXML

      Tutorial Beginner

      In this post, you'll learn how to parse XML into an array in PHP. SimpleXML is a PHP extension that makes this possible.

    2. How to Install PHP on Windows

      How to Install PHP on Windows

      Tutorial Beginner

      In this article, we’re going to discuss how to install PHP on Windows. There are three different ways that you can install and run PHP on Windows, and look...

    3. How to Check the PHP Version

      How to Check the PHP Version

      Tutorial Beginner

      Here are some quick tips on how to check the PHP version on your computer or server. There are a few different ways to check the PHP version, and I'll walk...

    4. How to Create, Write, Read, and Delete Files in PHP

      How to Create, Write, Read, and Delete Files in PHP

      Tutorial Beginner

      In this tutorial, we are going to learn file handling in PHP. I'll show you how to create, read, write, and delete files in PHP by using the built-in file...

    5. How to Install PHP in Ubuntu

      How to Install PHP in Ubuntu

      Tutorial Beginner

      Today, you'll learn how to install PHP in the Ubuntu OS. First, you'll see how to install the default stable version of PHP, and then we'll look at how to...

    6. What Is Composer for PHP and How to Install It

      What Is Composer for PHP and How to Install It

      Tutorial Beginner

      Today, we’re going to discuss one of the most important tools in PHP: the dependency manager Composer. In this article, we’ll look at the ins and outs of...

    7. How to Redirect With PHP

      How to Redirect With PHP

      Tutorial Beginner

      In this article, I'll show you how to redirect to another page with PHP. I'll explain exactly how PHP redirects work and show you what happens behind the...

    8. What Does PHP Stand For?

      What Does PHP Stand For?

      Tutorial Beginner

      In this quick post, we’re going to discuss what PHP stands for and what you can build with it. If you are new to PHP, this article should help you to...

    9. How to Run a PHP File

      How to Run a PHP File

      Tutorial Beginner

      Today, we’re going to discuss how you can run PHP files. If you're new to PHP programming, this article will help you learn how to run PHP scripts.

    10. How to Open PHP Files

      How to Open PHP Files

      Tutorial Beginner

      In this quick post, we’re going to discuss different ways to open and edit a PHP file. If you are a novice to PHP programming, this article should help you...

    11. What Is a PHP File?

      What Is a PHP File?

      Tutorial Beginner

      In this quick post, we’re going to discuss the ins and outs of a PHP file. If you're new to PHP programming, this article will help you grasp various aspects...

    12. How to Connect PHP to MySQL

      How to Connect PHP to MySQL

      Tutorial Beginner

      In this article, we’re going to discuss MySQL database connectivity in PHP. It’s aimed at beginners who want to learn how to connect PHP to MySQL and perform...