hance2105 Posted June 21, 2013 Share Posted June 21, 2013 i have the below code and want to know how to specify the height and width of the photo that is being displayed <div class="product_img"><a href=""><?= '<img src="Images/Products/'.$row['prod_photo'].'"/>'; ?></a></div> thanks for the help Link to comment https://forums.phpfreaks.com/topic/279430-setting-picture-height-and-width/ Share on other sites More sharing options...
litebearer Posted June 21, 2013 Share Posted June 21, 2013 This may help http://php.net/manual/en/function.getimagesize.php Link to comment https://forums.phpfreaks.com/topic/279430-setting-picture-height-and-width/#findComment-1437263 Share on other sites More sharing options...
hance2105 Posted June 21, 2013 Author Share Posted June 21, 2013 in fact what i need is to set the specific height and width in the code provided, meaning i already define it so that when retrieved the image is displayed in that size Link to comment https://forums.phpfreaks.com/topic/279430-setting-picture-height-and-width/#findComment-1437264 Share on other sites More sharing options...
richei Posted June 21, 2013 Share Posted June 21, 2013 the img tag has height and width attributes <?= '<img src="Images/Products/$row['prod_photo']" height="$img_height" width="$img_width" />'; ?> Link to comment https://forums.phpfreaks.com/topic/279430-setting-picture-height-and-width/#findComment-1437272 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.