Jump to content

[SOLVED] Creating table rows for ever other loop in a WHILE loop


avillanu

Recommended Posts

I'm trying to create a table using a MySQL fetch array while loop that would look like this:

 

CONTENT1    CONTENT2

CONTENT3    CONTENT4

CONTENT5    CONTENT6

 

I need a <TR></TR> for every other piece of content. But I don't know how to do this with a loop that uses a MySQL fetch array

 

 

while($row = mysql_fetch_array($result, MYSQL_ASSOC))

 

{

PHP CODE THAT IS LOOPED;};

 

I'm trying to remember from my old college Java class that we did something with loops for whenever the counter variable was even the loop would do something special...I don't know if this is possible with a while+mysql_fetch_array loop though

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.