title: PHP resize image to fit within a certain area
body: <p>I have an image file that is stored within the variable <code>$image</code> I want to resize this image so it would fit within an area of <strong>380px by 380px</strong> (so which means that the tallest side of the image must be 380px on the other side smaller than 380px).
  Has anyone a suggestion on how to do this?</p>
  
  <p>Thanks</p>