rdub Posted April 24, 2010 Share Posted April 24, 2010 Using this code to display a thumbnail image. Would like to specify height and width so all are uniform but haven't come up with the additional code. Can anyone help? ("<img src='" . $fetched['thumb'] ."' /> ") . Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/ Share on other sites More sharing options...
Pikachu2000 Posted April 24, 2010 Share Posted April 24, 2010 This is pretty basic html. Just add the height and width parameters to the <img> tag. Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047456 Share on other sites More sharing options...
rdub Posted April 24, 2010 Author Share Posted April 24, 2010 Not that easy so far. Sorry I didn't paste the entire code section. Maybe this will help. echo "<td width=378 valign=top>".$fetched['id']."<br />"."<span class=style1>"."<strong>".$fetched['Customer']."</strong>". ("<img src='" . $fetched['thumb'] . "' /> ") . I've tried adding the usual height and width. Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047459 Share on other sites More sharing options...
Pikachu2000 Posted April 24, 2010 Share Posted April 24, 2010 This won't work? echo '<img height="200" width="120" src="' . $fetched['thumb'] . '" />'; Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047462 Share on other sites More sharing options...
rdub Posted April 24, 2010 Author Share Posted April 24, 2010 No. When I add that nothing displays. Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047463 Share on other sites More sharing options...
Pikachu2000 Posted April 24, 2010 Share Posted April 24, 2010 It was meant as an example more than as a cut and paste . . . Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047473 Share on other sites More sharing options...
rdub Posted April 24, 2010 Author Share Posted April 24, 2010 I had already tried variations on this "example" and am looking for a resolution to the problem. Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047682 Share on other sites More sharing options...
litebearer Posted April 24, 2010 Share Posted April 24, 2010 is the path to the image included in $fetched['thumb'] Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047689 Share on other sites More sharing options...
rdub Posted April 24, 2010 Author Share Posted April 24, 2010 The path is designated within a field in the mySQL table. Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047690 Share on other sites More sharing options...
Pikachu2000 Posted April 24, 2010 Share Posted April 24, 2010 I can't think of any reason specifying the <img> height and width in the echo statement shouldn't work. What is echoed out to the browser in the HTML source of the page? There almost has to be a syntax error somewhere in the HTML output. Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047696 Share on other sites More sharing options...
rdub Posted April 24, 2010 Author Share Posted April 24, 2010 This is a part of what is echoed (Thumb and text). I apologize if I am not answering your question. // put what you would like to display within each cell here "<tr>\n"; echo "<td width=378 valign=top>".$fetched['id']."<br />"."<span class=style1>"."<strong>".$fetched['Customer']."</strong>". ("<img src='" . $fetched['thumb'] . "' /> ") . "<br />"."<span class=style1e>".$fetched['hi_lite']."</span>". "<br />".$fetched['Phone']. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047712 Share on other sites More sharing options...
rdub Posted April 24, 2010 Author Share Posted April 24, 2010 Got it. Thank you very much. ("<img . width=100 . src='" .$fetched['thumb'] ."' /> ") . Link to comment https://forums.phpfreaks.com/topic/199561-sizing-image-displayed/#findComment-1047717 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.