php image code code example

Example 1: img src php

<?php

while($row = mysqli_fetch_array($result)){

                          echo ' 
                              <tr>      
                              <td> '.$row['x'].' </td>
                              <td> '.$row['y'].' </td>
                              <td> '.$row['z'].' </td>
                              <td> '.$row['f'].' </td>
                              <td> '.$row['g'].' </td>
                              <td> '.$row['d'].' </td>
                              <td><img src="'.$url.'"/></td>
                              </tr>';
}
?>

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