Let’s say you have an XML file (like the one that follows) that you want to turn into an associative array in PHP. Doing this takes a few steps but it’s actually quite simple. I’m using a quiz questions XML […] Read More »
Category: PHP
Pass by Reference vs Pass by Value
Pass by reference versus pass by value is a topic that a lot of people get mixed up about, but it’s pretty simple once you get the basic concepts down. First, lets take a look at the formal definition of […] Read More »
Scotch Box Laravel
“The PHP Framework For Web Artisans” is quite a bold statement to make, but Laravel might just accomplish it’s goal of being the best PHP framework out there. Laravel is extremely powerful when it comes to making online applications and […] Read More »
Scotch Box
One of my favorite web development blogs is Scotch.io. They provide a huge variety of articles and tutorials aimed at making you a better web developer. All their content is usually super up to date with modern trends and they […] Read More »
API Calls with cURL
Making API calls with cURL is actually a lot more simple than most people things. In this tutorial we will walk through an example of to make an API call to the GitHub API and get a repositories README file […] Read More »
Object-Oriented WordPress
WordPress is normally written in procedural PHP which makes it extremely easy to read, write and follow along with the code to figure out whats going on. However procedural code also has it’s share of downsides such as namespace errors […] Read More »
File Uploads
Making a script that allows for file uploads is a common problem for many web developers just starting out, and can sometimes be a little tricky for those just starting out. Another problem comes from the wide variety of different […] Read More »
Variable Variables in PHP
Variables are the cornerstone to all programming. Any programmer will tell you that variables are their best friend, their lover, any number of other weird things… When you need something you simply call $something, and there it is! One of […] Read More »
Dynamic Variables in PHP
In PHP, and especially when using Database operations like mysqli functions, you will want to create dynamic variable names. Luckily PHP makes this an extremely mundane task to accomplish. First let’s take a look at a simple example so we […] Read More »
The Elvis Operator
The magic that is the Elvis Operator was only recently introduced to me. The Elvis Operator (which is a modified, shortended version of the ternary operator) allows you to clean up your code vastly by reducing the size of simple […] Read More »