Displaying two column html table while php loop
Am creating a newsletter template that can display news in tabular form, but i want the news to be displayed in two column per row.
Thanks.

    <?php
	$conn = mysql_connect("localhost", "rppt", "peep") or die(mysql_error());

	mysql_select_db('news', $conn) or die(mysql_error());

	$query = mysql_query ("Select i.nid, LEFT(i.fulltext, 350), UPPER(i.title), 
LOWER(c.name) from nl i JOIN jos_k2_categories c ON c.id=i.catid ORDER BY i.id LIMIT 0, 16") or die ('Error');

	$href = "http://www.ipaidabribenaija.com/index.php";

?>
	
	<table width="500px" align="center">
	<tbody>
  		<tr>
    		<td width="400px" height="344px" valign="top">
<table cellspacing="5">
      	<tbody>
        	
        
         <?php
		  	while(list($id, $fulltext, $title, $name)=mysql_fetch_array($query))
		  	{
			  	$i = 0;
		 ?>
         <?php
		 	$replacename = eregi_replace(" ",  "-", $name);
		 ?>
        <tr>
        	<td height="34">&nbsp;</td>
        </tr>
		<?php
			if($i%2 == 0)
			{
		?>
      	<tr>
        	<tr>
          		<td height="34">
<font color="#FF0000" size="+2"><strong><?php echo $title; ?></strong></font>&nbsp;</td>
          	</tr>
        	<tr>
          		<td height="34"><p><?php echo $fulltext; ?>...</p>

          			<p><a href="<?php echo $href ."/". $replacename ."/item/". $id; ?>">read more...</a></p>
                </td>
            </tr>
          	<?php
		  		}
				else{
			?>
			   	<tr>
          			<td height="34"><font color="#FF0000" size="+2"><strong><?php echo $title; ?></strong></font>&nbsp;</td>
          		</tr>
        		<tr>
          			<td height="34"><p><?php echo $fulltext; ?>...</p>
                    	<p><a href="<?php echo $href ."/". $replacename ."/item/". $id; ?>">read more...</a></p></td>
          		</tr>
				<?php
                	}
						}
		  		?>
       	</tr>
        </tbody>
     </table>
    </td>
    </tr>
	</tbody>
</table>

Displaying two column html table while php loop
===

Am creating a newsletter template that can display news in tabular form, but i want the news to be displayed in two column per row.
Thanks.

    <?php
	$conn = mysql_connect("localhost", "rppt", "peep") or die(mysql_error());

	mysql_select_db('news', $conn) or die(mysql_error());

	$query = mysql_query ("Select i.nid, LEFT(i.fulltext, 350), UPPER(i.title), 
LOWER(c.name) from nl i JOIN jos_k2_categories c ON c.id=i.catid ORDER BY i.id LIMIT 0, 16") or die ('Error');

	$href = "http://www.ipaidabribenaija.com/index.php";

?>
	
	<table width="500px" align="center">
	<tbody>
  		<tr>
    		<td width="400px" height="344px" valign="top">
<table cellspacing="5">
      	<tbody>
        	
        
         <?php
		  	while(list($id, $fulltext, $title, $name)=mysql_fetch_array($query))
		  	{
			  	$i = 0;
		 ?>
         <?php
		 	$replacename = eregi_replace(" ",  "-", $name);
		 ?>
        <tr>
        	<td height="34">&nbsp;</td>
        </tr>
		<?php
			if($i%2 == 0)
			{
		?>
      	<tr>
        	<tr>
          		<td height="34">
<font color="#FF0000" size="+2"><strong><?php echo $title; ?></strong></font>&nbsp;</td>
          	</tr>
        	<tr>
          		<td height="34"><p><?php echo $fulltext; ?>...</p>

          			<p><a href="<?php echo $href ."/". $replacename ."/item/". $id; ?>">read more...</a></p>
                </td>
            </tr>
          	<?php
		  		}
				else{
			?>
			   	<tr>
          			<td height="34"><font color="#FF0000" size="+2"><strong><?php echo $title; ?></strong></font>&nbsp;</td>
          		</tr>
        		<tr>
          			<td height="34"><p><?php echo $fulltext; ?>...</p>
                    	<p><a href="<?php echo $href ."/". $replacename ."/item/". $id; ?>">read more...</a></p></td>
          		</tr>
				<?php
                	}
						}
		  		?>
       	</tr>
        </tbody>
     </table>
    </td>
    </tr>
	</tbody>
</table>
