Author Archives: Tom

Zend Controller redirects and unit testing

This afternoon I found a bug in some old code that I’m refactoring and retrofitting unit tests into. Well, not a bug exactly but a Zend Framework controller quirk. It drove me absolutely nuts for ages until I went to … Continue reading

Posted in PHP, PHPUnit, Zend Framework | Leave a comment

Twitter Lists

Twitter have introduced lists as a way to organise who you follow.  I’ve started building a PHP list that follows interesting sites and prominent members of the community. Check it out here: http://twitter.com/teengenerate/php

Posted in General, Open Source, PHP, PHPUnit, Symfony, Twitter, Zend Framework | Leave a comment

Zend Framework FlashMessenger

For the uninitiated in the dark art of Zend Framework, the flashMessenger action helper is a session based message system that allows you to store and retrieve messages while redirecting and forwarding to different pages. A quick browse through the … Continue reading

Posted in Open Source, PHP, Zend Framework | Leave a comment

Zend_Db_Expr and how to use it

One thing that comes up a lot when updating a database is incrementing values. You might have a value stored in a column and you want to increment it by one or more but you don’t want to query the … Continue reading

Posted in PHP, Zend Framework | Leave a comment

Zend Form country lists

One task that comes up time and time again is creating a dropdown form element that is populated by a list of countries. In the past I solved this problem by keeping an key/value array of countries and their codes … Continue reading

Posted in PHP, Zend Framework | 1 Comment

htmlentities and character encoding

I recently came across a bug in some code I’d written where the input filters were doing something strange on certain peoples computers and truncating the inputted text when hitting a single quote. After a bit of googling I realised … Continue reading

Posted in PHP, Zend Framework | 2 Comments

First impressions of Symfony PHP Framework

In the last few years, every project I’ve worked on has run on top of Zend Framework or a custom in-house framework. Most of my work involves extending existing applications and that’s the major reason I haven’t looked into any … Continue reading

Posted in Open Source, PHP, Symfony, Zend Framework | Leave a comment

Generating an SEO friendly URL in PHP

Everyone wants pretty URLs right? Lots of key/pair GET values in URL strings look ugly and are bad for SEO. I was just messing about with a big database table of records that needed converting to SEO friendly urls and … Continue reading

Posted in Open Source, PHP, SEO | 1 Comment

jQuery 1.3.2 – To live is to die

I’m sure anyone that has developed in javascript has had monumental headaches over the years trying to write code that allows event handlers to operate on dynamically created elements. The main problem I always seem to come across is assigning … Continue reading

Posted in Javascript, Open Source, jQuery | Leave a comment

The aims of this blog

I find as a web developer that I’m constantly learning new things to get certain tasks done and then subsequently forgetting them if it’s not a skill that I use very often. This blog is an attempt to write down … Continue reading

Posted in General | Leave a comment