Caleb Ruth wrote:

I am selecting a single column from a db table and I want to split it into a
3 column HTML table. I am sure this has been done before. Any ideas?

$x=1; echo "<table><tr>"; while($r = fetchRow($result)) { echo "<td>{$r['data']}</td>"; if($x++%3==0) echo "</tr><tr>"; } echo "</tr></table>";

---John Holmes...

Amazon Wishlist:

php|architect: The Magazine for PHP Professionals –

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to