title: Merge two images in php
body: <p>I have two images I would like to merge then save to a new location.<br>
  I would like the second image to be place directly below the first image.<br>
  I have the following so for but the image doesn't even save.  </p>
  
  <pre><code>$destimg = imagecreatefromjpeg('images/myimg.jpg');
  
  $src = imagecreatefromgif('images/second.gif');  
  
  // Copy and merge
  imagecopymerge($destimg, $src, 316, 100, 0, 0, 316, 100, 100);
  </code></pre>
  
  <p>Both images have a width or 316px X 100px<br>
  From the above code the $destimg should now be 316x200 but that doesn't happen. Also like it to be a new image and save to another folder.</p>
  
  <p>Thanks for any help.</p>