Viewing: Matthew Horne

How to Install Python and PIP on Windows 10

Recently I had to install Python on Windows 10, so I could use the “Closure Linter” tool for PhpStorm. Here is a simple guide to show you exactly how to install Python and PIP on your Windows 10 machine. Download Python The first step is to download Python from python.org and select the most recent […] Read more

WordPress: Get the ID for the Front Page and Home

Normally in WordPress if you wanted to access an ID for a post or page you would reference the global $post variable. However, what if you wanted to access the ID for the Home and Front Page templates? In that case you will need to reference the stored ID from the WordPress database using the […] Read more

CSS Center an Element Vertically and Horizontally

Sometimes you just need to position something right in the middle. This used to be a tricky endeavor but these days you can just use something as simple as the example below. This is what I use and it works rather well. [thesis_block type=”note” header=”” content=”Note: I now use Flexbox, see the updated content below.”] […] Read more

JavaScript Array Types

JavaScript arrays come in different forms and this post will explain what the difference is between each array type. This post will look at the following array types; Homogeneous arrays Heterogeneous arrays Multidimensional arrays Jagged arrays Homogeneous Arrays As the name may suggest a homogeneous array is an array that stores a single data type(string, […] Read more

Learning PHP 101 – Custom Functions

Although PHP has a lot of built in functions. Developers often need to write their own functions in order to achieve their objectives. Functions are useful for eliminating repetition, but they can also be used to perform complex tasks and can even be used to group together a series of functions to output a particular […] Read more

Learning PHP 101 – Built In Functions

Functions are reusable bits of code that you use throughout a project. They help to better organize your application as well as eliminate the need to copy/paste repetitive pieces of code. In an ideal world an application should not have multiple functions doing the same thing. PHP has a lot! of built in functions and […] Read more

Learning PHP 101 – While & Do-While Loops

Loops are structures that can execute a set of statements multiple times. They save us time and make code management simpler. Each type of loop serves to fit different scenarios. It is important that you chose the right loop for the job. Remember: The for loop is used to loop through a block of code […] Read more

Learning PHP 101 – For & Foreach Loops

Programmers often have to repeat blocks of code a given number of times or until a certain condition is met and we can achieve this by either typing out each iteration like so: <?php echo "1"; echo "2"; echo "3"; echo "4"; // and so on ?> or we can use a for loop. <?php […] Read more

Learning PHP 101 – Arrays

An array is a list of items that can be stored in a single variable. Imagine making a list of things to do and each item is listed on its own sticky note. Before you know it your entire desk would be covered in sticky notes. The alternative is to group these items together in […] Read more

Learning PHP 101 – Conditionals and Control Flows

Conditionals and control flows are one of the most useful and common functions in PHP. If statements If statements allow you to make decisions within your code. Together with comparisons you can ask simple yes/no questions and provide different outcomes for each. Lets say you need people to declare their age before you can display […] Read more

123