function

function

Getting Started With PHPDoc

Monday, January 26, 2009 - 14:39

If you followed the tutorial on installing PHPDoc then you are probably wondering how to get started actually writing the documentation. PHPDoc will parse all the files given to it and look for comment blocks, it will then use these blocks to create the documentation for your application. A valid PHPDoc comment block must start with a '/**', have a '*' on every line and finish with '*/'.

Category: 

Randomising The Middle Of Words In PHP

Tuesday, November 18, 2008 - 10:59

I was sent an email the other day that contained some text were the start and end letter of each word were left alone, but the middle of each word was randomized. The weird part was that the text was still readable, which is due to the way in which the brain processes words.

Category: 

Enable Drag And Drop Script In Wordpress

Monday, October 27, 2008 - 11:58

Note: This code has been written with WordPress 2.8 in mind. It won't work on versions prior to 2.6 and might have unpredictable results in later versions.

Drag and drop is a useful mechanism to do stuff and can turn a complicated set of buttons or drop down lists into a simple elegant solution.

Wordpress has lots of scripts built in, which do a lot of useful functions. However, they are not enabled by default, which means that in order to get your script to work you need to enable them.

Category: 

PHP Function To Work Out Factorial Numbers

Wednesday, October 8, 2008 - 09:58

Factorial of a number is defined as the product of the number and all of the numbers small than it. So if you take the number 4 the factorial of that number is 24 or 1 x 2 x 3 x 4.

Factorials are useful for a number of applications, for example when working out how many times a set of objects can be combined in different ways.

Use the following PHP function to work out the factorial of any given number. The first thing it does it make sure that the number is greater than 1 because the factorial of the number 1 is 1.

Category: