Articles Tagged with php
You are currently browsing 3 articles tagged with php.
Creating a Basic Wordpress Plugin
Published Friday 3rd of February 2012
I recently created my very first Wordpress plugin (I've been coding themes for a few years though) and I thought I'd write down a little getting started for other plugin noobs out there.
I'll cover how to configure your plugin, connect to the database using the WPDB, install and uninstall DB tables, create a page in the admin and submit forms.
Be the first to post a comment
A thousand monkeys at a thousand typewriters in PHP
Published Tuesday 6th of December 2011
I actually had this idea ages ago and last night I started thinking about it again while trying to fall asleep so I decided to write the thing once and for all.
Using the
convBasefunction from the comments section here php.net/manual/en/function.base-convert.php as well as this little code snippet:<?php
$base = '0123456789abcdefghijklmnopqrstuvwxyz '; # add more if you wish
$slots = 1000000; # increase to get longer texts
$variations = pow(strlen($base), $slots);
for ($i = 0; $i < $variations; $i++) {
echo '"' . convBase($i, '0123456789', $base) . '"<br/>';
}You can make your computer print every text that's ever been written as well as any text that ever will get written in any language that uses the $base characters.
You'll get the LOTR trilogy written backwards only Frodo is called Froggo and the sky's color is purple and instead of beer everybody drinks the Swedish drink Trocadero.
You'll also get the answers to every question that can be asked in text and you'll get a detailed explanation of your life that's correct down to every little detail.
Mind you you'll get everything in between as well :P
Be the first to post a comment
MVC Without a Framework
Published Saturday 12th of March 2011
MVC (Model - View - Controller) is an excellent way to divide the tasks of an application into different layers that all handle separate things.

Image: Renjith Krishnan / FreeDigitalPhotos.netMany PHP frameworks use the MVC model but in this article I will try to explain how you can utilize MCV without the use of a framework.
First, I'll try to explain what the different layers all mean.
Join 2 others and post a comment