> -----Original Message-----
> From: Ian Grant [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 25, 2001 11:28 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Re: Making a new row in HTML tables
> 
> 
> Yeah, but if I had 31,
> I'd want 6x5 and then 1 over, or something....

What about 16?  2x8, 4x4, or 8x2?  And how would we decide which?
Would 34 be 2x17, or 6x5 with 4 over?
 
I'm with Hugh...unless you can define more clearly the rules you want
this thing to operate under, the easiest thing is probably going to be
to just pick a standard width and pad the last row.  If you wanted to
define special exceptions for total counts less than some arbitrary
number (30?), that ought to be simple enough to do manually.  Something
like...

   switch ($picture count) {
        .
        .
        .
     case 4: $row_width=2; break;
     case 6: $row_width=3; break;
     case 8: $row_width=4; break;
     case 9: $row_width=3; break;
     default: $row_width=6;
   }

should do the trick.


---
Mark Roedel           | "The most overlooked advantage to owning a
Systems Programmer    |  computer is that if they foul up there's no
LeTourneau University |  law against whacking them around a little."
Longview, Texas, USA  |                          -- Owen Porterfield 

 
> Hugh Bothwell <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Umm... 31 entries, 1 x 31...
> >
> > You might be better to choose a standard width and pad the 
> last row with
> > empty cells.
> >
> > "Ian Grant" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Hi,
> > >
> > > Can anyone help me with this - I have a database of 
> people, that I want
> to
> > > print into an HTML table - how can I make the table wrap 
> into an equal
> > > number of rows.
> > > i.e. if there are 4 entries, a 2x2 table, 6 a 2x3, 8 a 
> 2x4, 9 a 3x3,
> etc.
> >

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to