Code Snippets

Showing 21 to 30 of 32 posts.


Posted on April 30th, 2014 in JavaScript by Graeme

jQuery binding tip

This is a good little trick I’ve just picked up, which allows you to bind multiple functions to the same event (e.g. click), without each of the functions effecting the other.

Read more...


Posted on March 14th, 2014 in PHP

PHP Explode

How to use PHP exlode

Read more...


Posted on March 4th, 2014 in WordPress by Graeme

Creating a WordPress shortcode

Shortcode demo of a function returning the URL of the WordPress site.

Read more...


Posted on February 19th, 2014 in WordPress by Graeme

Woocommerce 2.0 plugin hooks

How to upgrade an old WooCommerce plugin to be compliant with WooCommerce 2.0

Read more...


Posted on February 4th, 2014

SCP Command - local to remote

To copy a folder from a local machine to a remote server, you can use the SCP command.

Read more...


Posted on February 2nd, 2014

CSS checkbox alignment

Using vertical-align to align checkboxes

Read more...


Posted on January 6th, 2014 in PHP

PHP timestamping and fwrite

Storing timestamps in a database with PHP

Read more...


Posted on November 19th, 2013 by Graeme

Abstract class order

The abstract class must be included before the extending class, and the extending class cannot be instantiated until before its definition.

Read more...


Posted on November 13th, 2013 in PHP by Graeme

PHP : GET multiple parameters with the same name from the URL

One way to access multiple parameters with the same name is simply to get the entire query string using $_SERVER[‘QUERY_STRING’], and then exploding the query string to get what you need.

Read more...


Posted on November 12th, 2013 in PHP

Fetching data from an RSS feed

Here’s a quick function showing you how to access data from an RSS Feed. This one uses the BBC’s news feed.

Read more...