Re: Splitting 1 Colomn into 2

From: Date: Sun, 26 Aug 2001 08:48:00 +0000
Subject: Re: Splitting 1 Colomn into 2
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64492@lists.php.net to get a copy of this message
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 <http404@hot.ee> To: <php-general@lists.php.net> 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#64492) next »