Image Size

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tito85
Forum Contributor
Posts: 104
Joined: Sat Mar 13, 2010 11:26 am

Image Size

Post by tito85 »

I need some help. I would like to add an image fixed size within this code, so when the image is displayed it will be displayed in the wanted size.

echo "<td align=\"center\"><img src=\"images/" . $recommendation['filename'] . "\"/><br /></td>";

Any help please?

Thanks :)
solid
Forum Commoner
Posts: 28
Joined: Wed Aug 12, 2009 11:56 am

Re: Image Size

Post by solid »

Sounds like you're over-complicating this :) Just do:

echo '<td align="center"><img src="images/' . $recommendation['filename'] . '" width="300" height="200" /></td>';
tito85
Forum Contributor
Posts: 104
Joined: Sat Mar 13, 2010 11:26 am

Re: Image Size

Post by tito85 »

Thank you very much! It is working!!!
Post Reply