show images on php code example

Example 1: how to show image from php

<html>
 <head>
 <title>display image</title>
 </head>
 <body>
 <p>Here in your form and text</p>
	<?php
 
	echo "<img src='image-name.png' >"; 

	?>  
 </body>
 </html>

Example 2: picture on picture php

$dest = imagecreatefrompng('mapCanvas.png');
$src = imagecreatefromjpeg('si.jpg');
imagealphablending($dest, false);
imagesavealpha($dest, true);
// Copy and merge
imagecopymerge($dest, $src, 17, 13, 0, 0, 60, 100, 100);

// Output and free from memory
header('Content-Type: image/png');
imagepng($dest);

imagedestroy($dest);
imagedestroy($src);

Tags:

Php Example