Hi all, Sounds a bit noobish but is anyone able to help me figure out a *clean* way to do the following? All the googling has driven me insane! Please tell me there is a function I cannot find that does this: http://pastebin.com/m50d4e6ca Any help/comments would be greatly appreciated :D Regards, Sean McRobbie