display img in 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: 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>';
}
?>

Tags:

Html Example