You ROCK!!!  Thanks so much, this worked perfectly!!!


-----Original Message-----
From: Alain Rivest [mailto:[EMAIL PROTECTED]
Sent: Friday, July 29, 2005 10:10 PM
Subject: Re: [PHP-DB] Help Needed

ReClMaples a écrit :

>Sorry, the data under 'Looking something like this' should be in a table
>format with 3 columns and 4 rows.
>-----Original Message-----
>From: ReClMaples [mailto:[EMAIL PROTECTED]
>Sent: Friday, July 29, 2005 8:46 PM
>To: PHP
>Subject: [PHP-DB] Help Needed
>     I know this is the wrong distro to be sending this request for help to
>but I don't know which one to send this to.  If you could either point me
>the direction that I should go or help me, I would greatly appreciate it.
>Here is my issue.
>I have a set of date that I want returned in 3 columns and an unspecified
>number of rows (dependent on the number of records returned).  I cannot for
>the life of me figure out how to do this.
You can do something like this :

$i = 0 ;
echo "<table><tr>";
while (fetch...)
    echo "<td>$your_data</td>" ;

    // every 3 row
    if ($i % 3 == 0)
       echo "</tr><tr>" ;

    $i ++ ;
echo "</tr></table>" ;

I know it's not perfect, I'll let you rewrite it more elegantly...


Alain --

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to