PHP Tutorial

PHP is a server side programming language that is used to develop dynamic websites. PHP is free to use and easy to learn. This PHP tutorial is well crafted for beginners as well as professionals.

 

Today, PHP is the mostly used programming language for web development. As per W3Techs, PHP is used by more than 80% of the all top websites.

 

Our PHP Tutorials covers PHP basics & advanced concepts with examples. “Tutorials Class” provides you PHP tutorials, exercises, codes, articles, and interview questions all at one place.

 

What are you waiting for? Learn PHP programming step by step here.

PHP Introduction

What is PHP? PHP is the most popular programming language for web development? Introduction to PHP includes its Features and Future Scope in this PHP Tutorial

PHP Terminology

PHP programming, involve different terms, tools and related technologies for web development. Learn briefly about common PHP Terminology

PHP Installation

Learn PHP Installation Step by Step using XAMPP (PHP – MySQL – Apache) in Windows. Click for PHP Installation tutorial for beginners

PHP Syntax

Learn PHP Syntax with an example – Create your first PHP basic program and Learn how to Run first PHP Script – Free Tutorials available at Tutorials Class

PHP Comments

PHP Comments Tutorial – PHP Comment is simply description about the PHP script or code. Learn Single Line & Multiple Line Comments syntax with example

PHP Variables

PHP Variables store a value that can change during the program execution. Learn more about PHP Variables & Variable Rules with example in this tutorial.

PHP Operators

PHP Operators are used to performing operations on variables and values. Learn more about PHP Operators with Examples. Find programs & assignments related to PHP Operators.

PHP Data Types

PHP Data types is a set of values and the allowable operations on those values. PHP supports eight primitive types. Learn about different PHP data types with examples.

PHP Decision Making

PHP decision statements are used to make a decision, based on some conditions. Learn PHP IF ELSE & Switch Statements with examples

PHP Loops

PHP Loops are used to execute the same block of code again and again until a certain condition is met. Learn more about While, Do-While, For and Foreach Loops in PHP with examples

PHP Functions

PHP Functions can be seen as ‘block of code’ or ‘set of statements’ that perform some tasks when executed. A function usually takes some input arguments, perform some action on them and returns some result. Example of a…

PHP Constants

A PHP constant is a name or an identifier for a simple value. A constant value cannot change during the execution of the script. Rules About Constant By default, a constant is case-sensitive. By convention, constant identifiers are…

PHP Errors

PHP Errors: PHP throws a different type of errors if something inappropriate happens during the program execution. It could be because of wrong syntax or many other reasons. By default, PHP handles errors in a simple way. An…

PHP Arrays

PHP Array stores one or more similar type of values in a single value. Learn about Numeric, Associative and Multidimensional arrays with an example

PHP Array Functions

PHP Array Functions allow you to access and manipulate arrays. Simple and multi-dimensional arrays are supported. Some Important Functions of PHP Arrays are listed below: array() Returns an array of the parameters. The parameters can be given an…

PHP String Handling

PHP String A string is a sequence of characters, like “Hello PHP!”. Run : http://ideone.com/vAUlM5 PHP String Functions Get The Length of a String using Function The PHP function returns the length of a string. Run : http://ideone.com/GXnHx2…

PHP Advanced

As you have learned the basic concepts of PHP, we will now move towards PHP advanced concepts. This will includes Files, Forms, Session, and Cookies Click on the next chapter to begin.

PHP Forms Handling

Forms HTML web forms are a combination of buttons, checkboxes, and text input fields embedded inside of HTML documents to capture user input. One of the most powerful features of PHP is the way it handles HTML forms….

PHP File Upload

Learn PHP File Upload with example. In this tutorial, we will upload files to server using HTML Form & PHP $_FILES variable & move_uploaded_file() function.

PHP File Handling

PHP File Handling PHP File handling is an important part of any web application. You often need to open and process a file for different tasks. Opening a File Reading a File Writing a File Closing a File…

GET and POST Method in PHP

HTTP The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers. HTTP works as a request-response protocol between a client and server. A web browser may be the client, and an application on a…

PHP Send Mail

In web application, it is common to send email messages. Almost every website has some query form or contact form where user fill form & form data will be sent in email to site administrator. PHP provides built-in…

File Inclusion using require() and include()

File Inclusion The include (or require) statement takes all the text/code/markup that exists in the specified file and copies it into the file that uses the include statement. Including files is very useful when you want to include…

PHP Cookies

Cookies are small piece of data stored on the client browser. More about PHP Cookies: Unlike normal variables, cookies data can be maintained for long time in browser, even after you close the browser. Data stored in cookies…

PHP Session

Sessions A session is a way to store information (in variables) to be used across multiple pages. Unlike a cookie, the information is not stored on the users computer. A PHP session solves this problem by allowing you…

Difference Between Cookies and Session

PHP sessions improve upon cookies because they allow web applications to store and retrieve more information than cookies. PHP sessions actually use cookies, but they add more functionality and security. Sessions store data on the server, not on…

PHP OOP Introduction

What is oops? Object-oriented programming (OOP) is a programming pattern based on the concept of “objects”. Objects can be referred as data structures that contain data, in the form of fields, often known as attributes; and code, in…

PHP Class

What is Class in PHP? A class is a collection of variables and functions working with these variables. Variables are defined by var and functions by function. Syntax of PHP Class Basic class definitions begin with the keyword…

Objects In PHP

Objects is an instance of your class without object there no use of class.If we have class then we need to create object of the class to solve our problem using class. You can create object of your…

PHP MySQL Tutorial

PHP and MySQL are widely used together to create web applications. In the next few chapters, you will learn about PHP functions to connect with database. You will be able to insert, create, delete and update records using…

PHP : MySQL Database

What is MySQL? MySQL is the most popular Relational Database Management System. It is open-source and free to use. It is developed and supported by Oracle Corporation. Many of the world’s largest and fastest-growing organizations including Facebook, Google,…

PHP : MySQL Connect

First, we need to make connection between PHP & MySQL Server. Then, PHP will be able to interact with MySQL database and access data. PHP-MySQL connection using MySQLi functions: MySQLi stands for MySQL improved. The MySQLi extension was…

PHP : MySQL Create Database

The “CREATE DATABASE db_name” command is used to create a database in MySQL. To learn more about PHP & MySQL database, we will create a Database. Later we will use it to insert or retrieve data from this…

PHP : MySQL Create Table

Data is stored in the form of tables in database. A table has its own unique name and consists of rows and columns. Syntax: Create Table using PHP and MySQL We will see how to create MySQL table…

PHP : MySQL INSERT Statement

The MySQL INSERT INTO statement is used to insert new records in a database table. Syntax: The INSERT INTO command is used to insert data in MySQL table. Following is the syntax: To insert string data types, it…

PHP : MySQL Select Data

The MySQL SELECT statement is used to select data from database tables. Process of Data Fetching/Retrieving: Create Database connection using mysqli_connect() Use mysqli_query() to perform a select query on database mysqli_query() returns a resource (data type) on success…

PHP : MySQL UPDATE Statement

The MySQL Update statement is used to update existing records in a database table. We can modify the records based on some conditions. Syntax: The following is the generic syntax of the UPDATE command to modify data in…

PHP : MySQL DELETE Statement

The MySQL DELETE statement is used to delete existing records from a database table. We can delete records based on some conditions. Syntax: The following is the generic syntax of the DELETE command to delete data from a…

PHP Ternary Operator

In simple words, PHP Ternary Operator is a shortened method of writing an if-else statement. In mathematics, Ternary is n -ary with n=3 which means three Operations. Same in programming languages like PHP, Ternary operator takes following three…

PHP : REST API – Introduction

In this tutorial, we will learn about PHP & REST APIs. REST API provides communication over network using multiple standards like HTTP, JSON, cURL, and XML.

PHP: REST API – file_get_contents()

There are two popular methods to fetch REST API data in PHP. Either you can use PHP built-in function or use CURL commands. Working with JSON data in API: XML & JSON are two mostly used API data…

PHP : REST API – GET data using cURL

In this tutorial, we will learn how to GET API data using cURL functions. What is cURL? cURL (stands for client URL) is a command-line tool to transfer data between servers. It supports various protocols such as HTTP,…

PHP : REST API – POST data using cURL

In this tutorial, we will learn how to POST API data using cURL functions. An HTTP POST is often used to create new content. If you are not familiar with basic cURL process and functions, read the previous…

PHP : REST API – PUT (Update) data using cURL

In this tutorial, we will learn how to use HTTP PUT to update REST API data using cURL functions. If you are not familiar with basic cURL process and functions, read the previous tutorial: PHP: REST API –…

PHP : REST API – DELETE data using cURL

In this tutorial, we will learn how to DELETE some REST API data using cURL functions in PHP. If you are not familiar with basic cURL process and functions, read the previous tutorial: PHP: REST API – GET…