Blog of Clive

PHP, MySQL, jQuery code, ideas and general developer crap

A simple PHP preg_replace statement that will convert uk date format ready to be inserted into a mysql table. 23/06/1981 returns 1981-06-23

Ever wondered how to install linux wireless network drivers on your Dell Inspiron 1501. I’ve recently given it a go and succeeded. Follow this guide and you’ll soon have your laptop running smoothly.

Emailology – The Science of Looking Good in the Inbox. While catching up on some rss feeds today this little gem popped into my window. It contains a boilerplate for HTML emails in loads of email programs. The compressed mode which is 109 lines of code.     The site also contains faq about common [...]

This function outputs a string that is filename friendly. It removes all non-characters and punctuation from the input and converts to lowercase. I find this useful for seo friendly cms pages. This function is still being tweaked so any improvements would be most appreciated. function checkCharacters($title) {         $final_text = ”;   [...]

Here’s an old bit of code that I found to position something centrally inside an element.

Now that Google+ buttons have been out for ages, I’ve finally got them added to my posts. That’s all for this post, just thought I’d make people aware!

This function is great for retrieving the last key of a multidimensional array. I use this function on a site that stores cake options such as size, shape, ribbon colour, icing colour and text fields for use in a shopping basket. Not all cakes have all the options so i need to know where the end of the array is, hence this function.

Following on from my other 2 useful functions I thought I would show you another one which I have found useful for determining if a colour background needs a white or black text colour over the top. I found this function a while back so can’t take the credit for writing it myself, I have [...]

Following from my last post, here is the method to get your IP address if you are behind a proxy. It’s a much better function than the earlier post as it will almost guarantee a return result.

Here’s a quick little function which can be used to return your IP address. Not as useful as the next method but a simple quick solution