This is how I divided one long column into several more equal sized columns.
Hope it helps.

print "<table align=center cellpadding=3 width=90%><tr><td valign=top
width=20%><h$fonts>";

while ($a_row=mysql_fetch_row($results))
 {
 $count=$count+1;
 foreach($a_row as $field)
  {
  print "$field <br>";
  }
 if ($count==78)
  {
  print "</h$fonts></td><td valign=top width=20%><h$fonts>";
  $count=0;
  }
 }
print "</h$fonts></td></tr></table>";

----- Original Message -----
From: HTTP-404 <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 26, 2001 11:07 AM
Subject: [PHP] Splitting 1 Colomn into 2


> Hello
> Thnx for your last replies, looks like i need more help with php now.
>
> I have this code:
>
> --------------------------------
> function displayCategory(){
>
>   include ('admin/config.inc.php');
>   $connection = mysql_connect ("$host", "$username", "$password");
>   if ($connection == false){
>   echo mysql_errno().": ".mysql_error();
>     exit;
>   }
>   $query = "select ID,Category from sections";
>   $result = mysql_db_query ("$dbase", $query);
>
>   if ($result){
>     echo "<table border=1>";
>     echo "<tr><td><b>Category</b></td></tr>";
>
>     $numOfRows = mysql_num_rows ($result);
>
>     for ($i = 0; $i < $numOfRows; $i++){
>       $ID = mysql_result ($result, $i, "ID");
>       $Category = mysql_result ($result, $i, "Category");
>       echo "<tr><td><a
>
href=\"knowledgebase.php?display=threads&thread=$ID\">$Category</a></td></tr
> >";
>     }
>     echo "</table>";
>   }
>   else{
>   echo mysql_errno().": ".mysql_error()."<BR>";
>   }
>   mysql_close ();
> }
> -------------------------
>
> It's pretty simple it grabs content into 1 huge colomn, i wonder how could
i
> split it into 2 colomns
>
> Thank You Very much
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to