RE: [PHP-DB] Help Needed
| From: | ReClMaples | Date: | Sat, 30 Jul 2005 03:21:20 +0000 |
| Subject: | RE: [PHP-DB] Help Needed | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39994@lists.php.net to get a copy of this message | ||
You ROCK!!! Thanks so much, this worked perfectly!!!
Thanks
-Rich
-----Original Message-----
From: Alain Rivest [mailto:moz@vivahate.org]
Sent: Friday, July 29, 2005 10:10 PM
To: php-db@lists.php.net
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: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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php