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'] ."' /> ") . Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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'] . '" />'; Quote Link to comment 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. Quote Link to comment 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 . . . Quote Link to comment 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. Quote Link to comment 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'] Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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] Quote Link to comment 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'] ."' /> ") . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.