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. Practice PHP and Learn: Databases

      Practice PHP and Learn: Databases

      Course Intermediate

      If you already know the basics of the PHP language and have created some simple scripts or applications, you might be wondering about your next step. To keep...

    2. How to Trim Strings in PHP

      How to Trim Strings in PHP

      Tutorial Beginner

      This quick tip will teach you how to trim strings in PHP from the left, right, or both ends at once. You will learn two different ways of doing it based on...

    3. How to Create a Thumbnail Image in PHP

      How to Create a Thumbnail Image in PHP

      Tutorial Beginner

      Today, we’ll discuss how to create thumbnail images in PHP with the help of the GD library.

    4. Create a Custom CAPTCHA and Contact Form in PHP

      Create a Custom CAPTCHA and Contact Form in PHP

      Tutorial Intermediate

      This tutorial will teach you how to create a CAPTCHA in PHP. You'll also learn how to integrate your custom CAPTCHA into a contact form and improve its...

    5. Quickly Build a PHP CRUD Interface With the PDO Advanced CRUD Generator Tool

      Quickly Build a PHP CRUD Interface With the PDO Advanced CRUD Generator Tool

      Tutorial Beginner

      In this article, we’re going to review PDO CRUD—a form builder and database management tool. PDO CRUD helps you build forms for your database tables with...

    6. Create a Google Login Page in PHP

      Create a Google Login Page in PHP

      Tutorial Intermediate

      Learn how to integrate Google login in your PHP website. We’ll use the Google OAuth API, which is an easy and powerful way to add Google login to your site.

    7. How to Send Text Messages With PHP

      How to Send Text Messages With PHP

      Tutorial Beginner

      Text messaging has become extremely widespread throughout the world—to the point where an increasing number of web applications have integrated SMS to notify...

    8. How to Paginate Data With PHP

      How to Paginate Data With PHP

      Tutorial Intermediate

      In this article, we'll discuss how to paginate data with PHP. At the end, we'll also discuss how you can implement AJAX-based pagination.

    9. PHP Integers, Floats, and Number Strings

      PHP Integers, Floats, and Number Strings

      Tutorial Beginner

      Learn about integers and floats in PHP, as well as the functions which can be used to determine the type of numbers that we are dealing with and convert...

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

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

      Tutorial Beginner

      Learn the basics of file upload in PHP. Firstly, we’ll go through the PHP configuration options that need to be in place for successful file uploads....

    11. How to Use the Modulo Operator in PHP

      How to Use the Modulo Operator in PHP

      Tutorial Beginner

      This tutorial will help you familiarize yourself with the Modulo operator—one of the fundamental arithmetic operators in PHP. In this post, we'll discuss...

    12. Generate Random Alphanumeric Strings in PHP

      Generate Random Alphanumeric Strings in PHP

      Tutorial Intermediate

      This tutorial will teach you how to generate random numbers and alphanumeric strings in PHP. We will discuss how to create strings with a specific set of...