basename() worked a treat, thanks. You've been a great help!