rajmohan Posted May 5, 2007 Share Posted May 5, 2007 i want to display image in client side what i insert from admin area Example if i entered 10 records in admin area it should display in client side like 1 2 3 4 5 6 7 8 9 10 how should i write a code for this one Link to comment https://forums.phpfreaks.com/topic/50127-how-to-display-image-in-row-wise/ Share on other sites More sharing options...
nita Posted May 5, 2007 Share Posted May 5, 2007 take a look at this one.. // code by Barand define ("NUMCOLS",3); $res = mysql_query("SELECT name, cover FROM movies"); $count = 0; echo "<TABLE>"; while (list($name, $cover) = mysql_fetch_row($res)) { if ($count % NUMCOLS == 0) echo "<TR>\n"; # new row echo "<TD>$name<br>$cover</TD>\n"; $count++; if ($count % NUMCOLS == 0) echo "</TR>\n"; # end row } # end row if not already ended if ($count % NUMCOLS != 0) { while ($count++ % NUMCOLS) echo "<td> </td>"; echo "</TR>\n"; } echo "</TABLE>"; edit it to you needs and you are set... nita Link to comment https://forums.phpfreaks.com/topic/50127-how-to-display-image-in-row-wise/#findComment-246139 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.