I think you're on the right path. It sounds like what you REALLY want is two equal length columns of products.
In that case, instead of 1,3,5,7,... which will become upset when you add and delete products; use mysql_num_rows($result). That is: $query="SELECT * FROM products WHERE <some condition>"; $result = mysql_query($query) or die(mysql_error()); $numrows = mysql_num_rows($result); $length = floor($numrows/2); if( mod($numrows,2)==1) $numrows++; for( $i=0; $i<$numrows; $i++ ) { $rowLeft = mysql_fetch_array($result); $rowRight = mysql_fetch_array($result); ... print your data side-by-side ... } NOTE: you'll have to format for the situation where there are more left-side rows than right-side; that is, there ae an odd number of products to be displayed. -----Original Message----- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 3:37 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query with numbers like 1, 3, 5.......... Hi again Rick! : ) It is because I am trying to list all products that I have in a database into a "menu page". And I would like to have two products beside eachothers. So... is it possible to get two datarows in one: do { } while (mysql_fetch_array() ); ?? or is this a stupid way to do it? Reagrds Raymond ----- Original Message ----- From: "Rick Emery" <[EMAIL PROTECTED]> To: "'Raymond Lilleodegard'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, February 07, 2002 8:55 PM Subject: RE: [PHP-DB] Query with numbers like 1, 3, 5.......... > Yes, but the question is why? > > -----Original Message----- > From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 07, 2002 1:22 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Query with numbers like 1, 3, 5.......... > > > Hi! > > Is there a way to get the rows with id's like 1, 3, 5, and so on or 2, 4, 6, > ...........? > > > Best regards Raymond > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > "Rick Emery" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Yes, but the question is why? > > -----Original Message----- > From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 07, 2002 1:22 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Query with numbers like 1, 3, 5.......... > > > Hi! > > Is there a way to get the rows with id's like 1, 3, 5, and so on or 2, 4, 6, > ...........? > > > Best regards Raymond > > > > -- > 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php