You ROCK!!! Thanks so much, this worked perfectly!!! Thanks -Rich -----Original Message----- From: Alain Rivest [mailto:moz@xxxxxxxxxxxx] Sent: Friday, July 29, 2005 10:10 PM To: php-db@xxxxxxxxxxxxx Subject: Re: 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:reclmaples@xxxxxxxxxxxxx] >Sent: Friday, July 29, 2005 8:46 PM >To: PHP >Subject: Help Needed > >All, > > 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 in >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 -- http://www.vivahate.org -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php