Okay, so I have two images in a file. One of them is of a t-shirt. The other is of a logo. I used CSS to style the two images so that it looks like the logo is written on the t-
This tutorial should get you started http://www.php.net/manual/en/image.examples.merged-watermark.php and on the right track