942,788 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 19
  • PHP RSS
Aug 13th, 2010
0

help to display images

Expand Post »
[code]
<?php do { ?>
<table width="50%" border="0">
<tr>
<td><a href=""><img src="imagethumb.php?s=<?php echo $row_books['Image']; ?>&w=100" border="0" alt= <?php echo $row_books['Title']; ?>></a></td>
</tr>

</table>
<?php } while ($row_books = mysql_fetch_assoc($books)); ?>
[code]
Displaye them in rows...I need colums of three
thanks in advance
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Sherlock09 is offline Offline
1 posts
since Aug 2009
Aug 14th, 2010
0
Re: help to display images
try like this
PHP Syntax (Toggle Plain Text)
  1. <?
  2. $i=0;
  3. while($row_books=mysql_fetch_array($books))
  4. {
  5. if( $i<3)
  6. {
  7. ?>
  8. <a href="imagethumb.php?s=<?php echo $row_books['Image']; ?>"><img src="images/buttonname.gif" alt="<?php echo $row_books['Title']; ?>" width="72" height="19" border="0" /></a>
  9. <?
  10. $i++;
  11. }
  12. if($i==3)
  13. {
  14. echo "<tr>";
  15. $i=0;
  16. }
  17.  
  18. }
  19.  
  20. ?>
Last edited by muralikalpana; Aug 14th, 2010 at 1:49 am.
Reputation Points: 21
Solved Threads: 35
Posting Pro
muralikalpana is offline Offline
534 posts
since Sep 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Quick question: join forms into 1 hidden form?
Next Thread in PHP Forum Timeline: Searching multiple fields...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC