I'm not going to give you code because that would make it too easy.
Start a counter variable at 0.
Increment it with each cell you draw.
Once it reaches the number of cells you want across, set your counter back
to zero and draw the appropriate </tr><tr> stuff.
On Wed, 17 Apr 2002, Jason Soza wrote:
> 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:
> 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,
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php