Result set in different columns

Result set in different columns

am 10.04.2006 16:00:06 von mbomgardner

I am trying to work through some display logic where I want to display a
results set from a database query into to columns in a table, but I
can't see to get it correct.

Example; I want to loop through the months of the year and display them
like this;

January February
March April
May June
July August
September October
November December

Any ideas?


Mark Bomgardner

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Result set in different columns

am 10.04.2006 16:24:37 von Bastien Koert

$cols = 2;
echo "

";


while ($rows = mysql_fetch_array($result))
{
if (($cols % 2) == 0 ){ echo ""; }

echo "";
$c++;
}

echo "
".$rows['something']."
";


bastien


>From: Mark Bomgardner
>Reply-To: mbomgardner@kletc.org
>To: Php-Db
>Subject: [PHP-DB] Result set in different columns
>Date: Mon, 10 Apr 2006 09:00:06 -0500
>
>I am trying to work through some display logic where I want to display a
>results set from a database query into to columns in a table, but I can't
>see to get it correct.
>
>Example; I want to loop through the months of the year and display them
>like this;
>
> January February
> March April
> May June
> July August
> September October
> November December
>
>Any ideas?
>
>
>Mark Bomgardner
>
>--
>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