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. Working With PHP Arrays in the Right Way

      Working With PHP Arrays in the Right Way

      Tutorial Intermediate

      Become a stronger PHP developer using a list of common array functions, with examples of usage and best practices.

    2. Build a CMS With Laravel

      Build a CMS With Laravel

      Course Intermediate

      Laravel is a PHP framework for modern web apps. Now on version 5, it’s a mature system that continues to win support due to its elegance and stability....

    3. PHP Control Structures and Loops: if, else, for, foreach, while, and More

      PHP Control Structures and Loops: if, else, for, foreach, while, and More

      Tutorial Beginner

      Today, we're going to discuss control structures and loops in PHP. I'll show you how to use all the main control structures that are supported in PHP, like...

    4. WP_Query Arguments: Categories and Tags

      WP_Query Arguments: Categories and Tags

      Tutorial Intermediate

      In the next part of this series on mastering WP_Query, I'll show you the arguments you can use to query categories and tags with WP_Query and how to code them.

    5. PHP Namespace Tutorial: The Basics

      PHP Namespace Tutorial: The Basics

      Tutorial Beginner

      In this tutorial, I'll go through the basics of namespaces in PHP. I'll explain why you might need namespaces and I'll show you how to use PHP namespaces in...

    6. How to Autoload Classes With Composer in PHP

      How to Autoload Classes With Composer in PHP

      Tutorial Beginner

      In this article, we’ll discuss the basics of autoloading in PHP and how to autoload PHP classes with Composer. I'll explain why autoloading is so important...

    7. 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.

    8. 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...

    9. 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...

    10. 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...

    11. 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...

    12. 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...