Posted By

simsevu on 06/11/10


Tagged

php html


Versions (?)

3rd iterator


 / Published in: PHP
 

URL: cw-med-iterator

  1. $path = "images/";
  2. $imageType = ".png";
  3.  
  4. $i = 0;
  5. echo '<table style="width: 700px;" cellspacing="30" cellpadding="0" ><tr>';
  6. while ($list = mysql_fetch_assoc($result)) {
  7.  
  8. if($i % 3 == 0)
  9. echo '</tr><tr>';
  10.  
  11. echo '<td><img src="'.$path.$list["name"].$imageType.'" alt="'.$list["title"].'" /></td>';
  12.  
  13. $i++;
  14.  
  15. }
  16. echo '</tr></table>';

Report this snippet  

You need to login to post a comment.