Arranging Data

From: Date: Wed, 17 Apr 2002 22:57:32 +0000
Subject: Arranging Data
Groups: php.general 
Request: Send a blank email to php-general+get-93433@lists.php.net to get a copy of this message
How would I have a script display results in a table, but make it so that once 3 or 4 results are displayed in one table row, a new table row would be started? Right now I have something like: printf("<img src='%s'><br>",$pic1); And all the records for $pic1 come out into a single column which, if I had many records, could get unwieldy. I'm looking to do something like: print("<table>"); print("<tr>"); printf("<td><img src='%s'></td>",$pic1> Where instead of one table row being created with endless <td>'s, the printf() function would print just 3 records, then another '<tr>' tag would be printed to start a new row, where printf() could print the next 3 records, and so on. Is this possible? Thanks in advance, Jason

« previous php.general (#93433) next »