Archive for May, 2007

Convert Multiple Spaces To a Single Space

0Chris29th May 2007Uncategorized

Sometimes you want to sanitise a block of text or input by removing consecutive multiple whitespace entries from it, replacing them with a single space. This php code will allow you to do just that:


$message = preg_replace(‘/ss+/’, ‘ ‘, $message);





Match a European Union VAT number

0Chris29th May 2007Regular Expressions

This expression should allow you to match an EU (European Union) VAT (Value Added Tax) Number.

Useful when dealing with international billing validation for example.





Hello world

0Chris29th May 2007Misc

Hello world, and welcome to my new website.

Though I can't reveal specifics about particular projects I'm working on, if during my work as a PHP/MySQL developer I should come across anything that I think would be of benifit to the world I'll generally be posting it here.

Who knows what you may find :)