Presenting data into rows or columns is a standard action realized with a simple loop through your record set. Often the data have to be presented in a different order. This example shows a table where the results are provided into columns and rows. Each row holds a number of records from your database; if the number of columns is reached a new row will be used. If there are no more records empty cells will be created and the dynamic creation of cells and rows is ended after the last row has reached the maximum number of columns.

DigitalOceanSSD Cloud Server from $5/month by DigitalOcean, simple cloud hosting, built for developers. Receive $10 in credits »
ServerPilotServerPilot is the best way to run WordPress and PHP sites on your DigitalOcean servers. First month free »
Download.com - http://download.com.com/
Find the software you're looking for at Download.com...
PHP: Hypertext Preprocessor... - https://www.php.net/
What is PHP? PHP is a widely-used general-purpose scripting...
MySQL AB - http://www.mysql.com/
The world's most popular open source database...
World Wide Web Consortium... - http://www.w3.org/
W3C's nearly 400 member organizations lead the World...
PHPBuilder.com - http://www.phpbuilder.com/
A resource for PHP tutorials, templates, PHP manuals...
Regular Expression Library... - http://www.regexlib.com/
Regular Expression Library provides a searchable database...
Magpie RSS - PHP RSS Parser... - http://magpierss.sourceforge.net/
MagpieRSS is compatible with RSS 0.9 through RSS 1.0...
Dev Shed - http://www.devshed.com/
Open Source Web Development Tutorials, articles and...
Homepage of the FPDF Library... - http://www.fpdf.org/
About: FPDF is a PHP class which allows to generate PDF...
PostCast Server - Free SMTP... - http://www.postcastserver.com/
Download PostCast Server - Free, multi-threaded outgoing...