Hi, this is my first post. I'am a newbie in both newsgroups and php.I wrote the following code to pick picture names from the database and then insert them in a table.But unfortunately I could not manage to make rows equal. I mean I want to have four <td></td> regardless of how many pictures are there(there can be maximum 4 in a row). In other words I want is just to have four <td></td> to make my table look normal.
<? for( $i = 0; $row = mysql_fetch_array($viewpic); $i++ ) { if( $i % 4 == 0 && $i != 0 && $i != mysql_num_rows( $viewpic ) - 1 ) echo "</tr><tr>"; $tekharf = strtolower($row["BandName"]); echo "<td><a href='http://mysite/Bands/viewfull.php?PicID={$row[PicID]}&BandID={$row[BandID]}'><img class='link' src='http://mysite/pics/thumbnail/{$tekharf{0}}/{$row[PName]}.jpg' border=1></a></td>"; } ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php