Re: Help Needed

From: Date: Sat, 30 Jul 2005 03:10:14 +0000
Subject: Re: Help Needed
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-39993@lists.php.net to get a copy of this message
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@sbcglobal.net] Sent: Friday, July 29, 2005 8:46 PM To: PHP Subject: [PHP-DB] 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

« previous php.db (#39993) next »