PHP Tutorials

PHP is an open-source scripting language, used by many sites to create features such as blogs, user systems, forums, and more.

PHP Basics

Introduction to PHP

PHP is an open-source scripting language, used by many sites to create features such as blogs, user systems, forums, and more. Read More.

PHP Syntax

Syntax is the rules that ensure code is written in a structured way. For that reason it's important to understand Syntax before starting to learn a new programming language. Read More.

PHP Variables

Variables are used to storing values such as a text string "hello" or a numeric value "7". Once declared it can be reused as many times as needed without having to redeclare it. Read More.

PHP Strings

There are many different types of strings in PHP, this tutorial aims to guide you through them and help you understand when best to use each string. Read More.

PHP Numeric Strings

Numeric strings are used all the time in PHP, whether it be to count through loops or just to count certain features such as number of posts. They behave in a similar way to double quotation strings and you don't... Read More.

PHP If, Else, Elseif

IF and ELSE statements are commonly used within PHP to process results of input data. This could include a submit form, site navigation or even browser information. Read More.

PHP Switch

Switch statements in PHP are used to perform different actions based upon different conditions. A switch statement is commonly used for a PHP Navigation System. Read More.

PHP While

Loops execute a block of code while a condition is true or a specified number of times. Read More.


Loops execute a block of code while a condition is true or a specified number of times. Read More.

PHP Functions

The power of PHP comes to light through its functions with over 700 functions built into PHP. To find a full list of functions visit . Read More.

PHP Post & Get

Both $_POST and $_GET are very useful when using forms with PHP. Post data allows for PHP to process more sensitive data such as login forms and contact forms. The way to tell the difference between a Post and a... Read More.

PHP Form Validation

It's important when submitting a form that you make sure people can't attack your website with the submit data. A common way of structuring form validation is through the use of IF's and ELSE's (see examples below). Read More.

PHP Advanced

PHP Date

The PHP date function allows you to format a timestamp into human readable form. There is a vast amount of options depending on how you wish to format the date. For the full list visit . Read More.

PHP Include & Require

In PHP, much like other coding languages you can insert a block of code from one file to another before the server executes the code. Read More.

PHP Cookies

A cookie is a small file a website embeds on an end users computer to store certain data. Commonly they're used with login systems as well as storing information about browsing history. Read More.

PHP Sessions

When your website reaches the level of complexity where you wish to pass data across multiple pages then you should consider using PHP Sessions. Read More.

PHP Mail

The mail function within PHP allows you to send emails to any specified email address from within the script. Read More.

PHP Secure Mail

The following resource goes through a simple, yet effective way to securely send PHP Mail. It pulls together mail and validation posts to pass variables through stringant tests before sending the mail. Read More.

PHP Strings

PHP strpos

The ability to take a string and derive different things from it is very useful in any code, especially PHP. Strpos stands for string position and allows you to search a specific string for a letter or key word. Read More.

PHP str_replace

The string replace function (str_replace) allows developers to quickly manipulate strings and add/remove certain characters or phrases with ease. Read More.

PHP substr_replace

The function substr_replace is much like the normal str_replace but introduces some additional functionality to the user. It is more mathematically based than str_replace as it allows you to define length and starting points. Read More.

PHP Uppercase & Lowercase

There are 3 basic functions that are used within PHP for string capitalisation - ucwords, strtoupper, strtolower. Each of these functions can be useful for many different reasons when using PHP. Read More.

PHP Explode

The explode function in PHP takes a string and splits it into smaller sections based upon the criteria you give it. A common use for explode is taking a string and exploding it so that all the words are in... Read More.

PHP Implode

PHP Implode does the reverse of the function explode. This means that you pass an array of data through the implode function and you can glue the bits back together to make a full string. Read More.


PHP OOP Introduction

Object Orientated Programming within PHP is a method whereby the developer can group similar tasks together in classes. This method of programming is also known as "DRY" - don't repeat yourself. Read More.

PHP Classes

A class in PHP allows developers to group similar tasks together to access them easily. A class is much like a blueprint or a plan, it sets out what you're going to do. Read More.