TAG = php

Temperature Conversion Script in PHP

Author: Patrick Morrow

In this lesson I show you how to create a simple temperature conversion script in PHP

Read More html php video

How to Use the Ternary Operators in PHP

Author: Patrick Morrow

In this lesson we will look at how we can shorten the IF THEN ELSE statement by using the ternary operators in PHP.

Read More php

Days Until Christmas in PHP

Author: Patrick Morrow

In this short tutorial we will create a 'Days Until Christmas' script using PHP

Read More php

How to Sort Arrays in PHP

Author: Patrick Morrow

In this lesson we look at how to sort arrays (including associative arrays) in PHP

Read More php

How to Create an Array from a CSV

Author: Patrick Morrow

In this lesson I show you how to create an array from a CSV string

Read More php

PHP for Beginners

Author: Patrick Morrow

This 5* rated course by a national award-winning teacher will take you through the basics of learning a coding in PHP.

Read More course html php

PHP Challenge 9 - ISBN Checker

Author: Patrick Morrow

Each published book is given a unique identifier called an International Standard Book Number or ISBN for short.

Read More challenge html php

Using Loops in PHP

Author: Patrick Morrow

In this short lesson we look at how to construct some simple loops and why they are used.

Read More php loops

PHP Challenge 8 - Good Morning, Good Evening, Good Night

Author: Patrick Morrow

We have already seen how we can use the DateTime class in PHP. In this challenge you need to check the time of day and then present an appropriate message.

Read More challenge php

How to Use the DateTime Class in PHP

Author: Patrick Morrow

One of the things most developers face is dealing with time calculations and logging. In this lesson we play around with the DateTime class and see how useful it can be.

Read More php

PHP Challenge 7 - Going Round in Circles

Author: Patrick Morrow

In this challenge you are required to let the user enter the coordinates of the centre of two circles and their respective radii and then calculate if the circles touch or overlap.

Read More challenge css html php

PHP Challenge 6 - Heads I Win, Tails You Lose

Author: Patrick Morrow

This challenge tests your understanding of generating random numbers and testing using the IF-ELSE statement.

Read More php challenge

How to Calculate the Difference Between Two Dates in PHP

Author: Patrick Morrow

In this short lesson we look at how to create a Bootstrap styled form allowing the user to enter two dates. We then calculate the time difference between the two dates.

Read More bootstrap html php

PHP Challenge 5 - Rearranging Letters into Alphabetical Order

Author: Patrick Morrow

In this challenge you are required to allow the user to input a word and then rearrange the letters of that word into alphabetical order.

Read More challenge html php

Multiple Dropdown Lists Using jQuery Ajax and PHP

Author: Patrick Morrow

In this tutorial we will populate a dropdown list based on the value of another dropdown list. This is commonly used for countries and states.

Read More mysql pdo css bootstrap jquery html php

How to Process Form Data in PHP

Author: Patrick Morrow

One of the most common interactions with a user is through a form. Being able to process the data from a form is a necessity for many websites.

Read More css bootstrap html php

PHP Challenge 4 - Check if a Number is a Factor of Another Number

Author: Patrick Morrow

This fairly simply challenge involves quite a powerful little test which you may find yourself using on a regular basis.

Read More challenge html php

PHP Challenge 3 - Create a Multiplication Grid

Author: Patrick Morrow

As a developer you will be using loops regularly. This challenge requires you to use nested loops to produce a multiplication grid and then use some basic styling to identify square numbers.

Read More php html loops css challenge

How to Create an RSS Feed Reader

Author: Patrick Morrow

In this lesson we will take an external RSS feed, read it using the PHP simplexml_load_file function and then loop through the file presenting the feed on our website.

Read More php html loops

How to Automatically Add the Current Year in PHP

Author: Patrick Morrow

Happy New Year. In this lesson we cover how to automatically add the current year to your copyright. Quite appropriate for today!

Read More php

PHP Challenge 2 - Working With Arrays and Array Functions

Author: Patrick Morrow

In this challenge you will need to work with arrays and array functions in PHP in order to find some basic results. This challenge involves using actual recorded data and is typical of challenges you may face when coding for a client.

Read More php challenge html

How to Create a jQuery Ajax and PHP Autocomplete Script

Author: Patrick Morrow

In this lesson we will create an autocomplete script using jQuery and PHP. Autocomplete fields can be extremely useful for searching through database records and making suggestions to the user.

Read More php html jquery css pdo mysql

PHP Challenge 1 - Generate the Fibonacci Numbers Based on User Input

Author: Patrick Morrow

In this challenge you are required to allow the user to input a number. You will then use this number to generate the Fibonacci numbers up to and including the user input.

Read More php html challenge

How to Use Regular Expressions to Check Password Strength

Author: Patrick Morrow

In a previous tutorial we created a simple registration form. Websites often require a specific strength for a password. In this lesson we will use RegEx to test the password strength.

Read More php regex

How to produce a chessboard pattern in PHP

Author: Patrick Morrow

This is a great lesson for those who want to learn more about nested loops and conditional statements. We produce a simple chessboard pattern.

Read More loops php html

How to use array_slice()

Author: Patrick Morrow

Arrays are very powerful and can be used across many facets of coding. In this lesson we look at how we can extract and return part of an array using array_slice().

Read More php

How to use foreach loops

Author: Patrick Morrow

In this lesson we look at how to create a foreach loop in PHP. There are many uses for loops, especially when you deal with returned data from a database query. In this example we shall consider an array of values and we will loop through those values and output each.

Read More php loops

How to create a cookie in PHP

Author: Patrick Morrow

Cookies can be incredibly useful on websites. They are used for a multitude of purposes, most notably for storing user preferences. In this lesson we will explore how to create and update cookies.

Read More php

How to use sessions in PHP

Author: Patrick Morrow

Once you start to advance your coding a little and work with interactive websites you will probably need to start to track the website visitors through the use of sessions and/or cookies.

Read More php

PHP for Beginners

Enrol in the full course here

PHP, MySQL and PDO

Coming soon, a full course on using PHP, MySQL and PDO. Be notified as soon as the course goes live.