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. PHP Exceptions: Try Catch for Error Handling

      PHP Exceptions: Try Catch for Error Handling

      Tutorial Beginner

      In this post, you'll learn how to use exception handling in PHP. As of PHP 5, we can use try catch blocks for error handling—this is a better way to handle...

    2. Get Command-Line Arguments With PHP $argv or getopt()

      Get Command-Line Arguments With PHP $argv or getopt()

      Tutorial Intermediate

      In this tutorial, you will learn how to access command-line arguments inside your script with $argv and getopt() in PHP.

    3. PHP Type Casting: A Complete Guide

      PHP Type Casting: A Complete Guide

      Tutorial Beginner

      This tutorial will help you learn the basics of type casting in PHP. We will learn about allowed cast types and the rules followed for such castings.

    4. Functional Programming in PHP With Lambda Functions

      Functional Programming in PHP With Lambda Functions

      Tutorial Intermediate

      One of the nice things about programming is that the same problem can be solved using multiple methods. This tutorial will teach you how to use functional...

    5. Comparing the 5 Best PHP Form Builders (And 3 Free Scripts)

      Comparing the 5 Best PHP Form Builders (And 3 Free Scripts)

      Tutorial Beginner

      Looking for a PHP form builder script for your website? Today, we compare the five best PHP form generators available at CodeCanyon. This post will help you...

    6. How to Use AJAX in PHP and jQuery

      How to Use AJAX in PHP and jQuery

      Tutorial Beginner

      Today, we’re going to explore the concept of AJAX with PHP. The AJAX technique helps you to improve your application's user interface and enhance the overall...

    7. Understanding Static Functions and Static Classes in PHP

      Understanding Static Functions and Static Classes in PHP

      Tutorial Beginner

      Static functions and static classes can be easily accessed without necessarily creating an instance of that class. This helps keep your code clean and...

    8. How to Use parse_str in PHP

      How to Use parse_str in PHP

      Tutorial Beginner

      In this article, we’ll explore the parse_str function in PHP. It’s used to convert a GET request query string into variables.

    9. How to Learn PHP

      How to Learn PHP

      Tutorial Beginner

      In this post you'll get some practical links and tips on how to learn PHP. We'll help you get started with learning the basic concepts of PHP so that you can...

    10. 7 PHP QR-Code Contactless Digital Restaurant Menus

      7 PHP QR-Code Contactless Digital Restaurant Menus

      Tutorial Beginner

      Contactless menus are online digital menus that can be accessed using a QR code. In this post, we'll look at some contactless QR code digital restaurant...

    11. Scrape Search Engine Result Pages in Real Time With Zenserp

      Scrape Search Engine Result Pages in Real Time With Zenserp

      Tutorial Beginner

      This tutorial will show you how to use the Zenserp API to easily search pages from popular search engines in real time.

    12. Why You Should Be Using PHP's PDO for Database Access

      Why You Should Be Using PHP's PDO for Database Access

      Tutorial Intermediate

      Many PHP programmers learned how to access databases by using either the MySQL or MySQLi extensions. Since PHP 5.1, there's a better way. PHP Data Objects...