$src1 = imagecreatefromjpeg('images/image1.jpg');
$src2 = imagecreatefromjpeg('imges/image2.jpg');
//Create a blank image and set the width and height
$dest = imagecreatetruecolor(300, 900);
//Now copy the source image on the created blank image on the set positions
imagecopy($dest, $src1, 0, 0, 0, 0, 300, 400);
imagecopy($dest, $src2, 0, 350, 0, 0, 300, 400);
Sign up here with your email