Jump to content

[SOLVED] Image size


mjgdunne

Recommended Posts

Hi all, I am having a slight problem, i want to display images which i am taking from a directory i have the images displaying but they are huge. I was wondering if there is any way of resizing the image.

Here is my code to display the image.

echo "<tr><th>Image</th>";
	echo "<td>";
    	echo "<img src='cars/".$row['image']."'/>";
echo "</td></tr>";

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/103717-solved-image-size/
Share on other sites

Hi yes this seems the easier option, but iv tried adding height and width into this code:

echo "<tr><th>Image</th>";
	echo "<td>";
    	echo "<img src='cars/".$row['image']."'/>";
echo "</td></tr>";

 

Except im getting the following error.

 

Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in C:\xampp\htdocs\viewimg.php on line 69
Link to comment
https://forums.phpfreaks.com/topic/103717-solved-image-size/#findComment-531057
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.